Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions CODING-GUIDELINES.md
Original file line number Diff line number Diff line change
Expand Up @@ -9009,15 +9009,17 @@ superproject; built on codecs, not merged).**
- **crypto's key formats are codecs formats: `crypto::formats::raw`, `spki`,
`pkcs8`, `der` and `pem(spki)` or `pem(pkcs8)` (RFC 7468's armor over the
DER), each with `codecs::value_codec` specializations in the curve's
`formats.hpp`, and the verbs `crypto::encode` and `crypto::decode<T>` (and the
members `encode` and `T::decode`) that check the pair, then call codecs'.** A
pair a type does not have stops the build with the type's list of formats; one
list, `detail::all_formats`, feeds the checks, the tests and the page's table.
The old names (`encode_spki`, `to_der`, `crypto::pem`, the pem defaults, the
`max_*_size` constants) are removed, each with its replacement in the guide's
migration table (`doc/formats.adoc`); no name stays as an alias. A program
that uses one curve's formats includes that curve's formats header and pulls
no other curve.
`formats.hpp`, read and written by codecs' verbs `codecs::encode` and
`codecs::decode<T>` (and the members `encode` and `T::decode`), which check
every pair through crypto's declaration of the type to codecs;
`crypto::encode` and `crypto::decode` were removed by the one-verb change,
with no alias.** A pair a type does not have stops the build with the type's
list of formats; one list, `detail::all_formats`, feeds the checks, the tests
and the page's table. The old names (`encode_spki`, `to_der`, `crypto::pem`,
the pem defaults, the `max_*_size` constants) are removed, each with its
replacement in the guide's migration table (`doc/formats.adoc`); no name stays
as an alias. A program that uses one curve's formats includes that curve's
formats header and pulls no other curve.
Source: `libraries/crypto/openspec/changes/formats/design.md` D1 to D8
(proposals); `doc/formats.adoc`, `doc/changelog.adoc` (libs/crypto).
- **secp256k1's x-only key is a type, `curves::secp256k1::xonly_public_key`,
Expand Down Expand Up @@ -10135,10 +10137,10 @@ The owner's decisions:
webcpp::hash's, `hash::formats::base58_with_checksum`, which is
`basic_base58<100, bitcoin_alphabet, hash::checksums::double_sha256>` (decision
26 renames decision 7's `base58check`); crypto registers its key formats through
`value_codec` in a change of its own, and `crypto::encode` and `crypto::decode`
are that change's verbs over codecs'. Both follow-ups are built (crypto's
`formats` change and hash's `base58-with-checksum`, chapter 17's crypto
entry), and hash depends on codecs, never the reverse.
`value_codec` in a change of its own, read and written by codecs' own verbs (the
one-verb change removed `crypto::encode` and `crypto::decode`). Both follow-ups
are built (crypto's `formats` change and hash's `base58-with-checksum`, chapter
17's crypto entry), and hash depends on codecs, never the reverse.
Source: design.md owner decisions 7 and 26 (proposals);
`test/messages/base58_with_checksum_unseen` (libs/codecs).
- **Owner decision 8: the tests.** RFC 4648 section 10, BIP-173's and BIP-350's
Expand Down
2 changes: 1 addition & 1 deletion libs/codecs
Submodule codecs updated 85 files
+6 −1 doc/allocators.adoc
+2 −2 doc/changelog.adoc
+44 −5 doc/composition.adoc
+18 −0 doc/formats.adoc
+12 −7 doc/overview.adoc
+7 −1 doc/results.adoc
+84 −0 doc/writing_a_format.adoc
+2 −0 example/Jamfile
+141 −0 example/over_value.cpp
+7 −0 example/over_value.expected
+18 −0 example/pem.cpp
+4 −0 example/pem.expected
+205 −0 example/value_formats.cpp
+7 −0 example/value_formats.expected
+206 −1 include/webcpp/codecs/armor.hpp
+377 −7 include/webcpp/codecs/detail/core/contract.hpp
+100 −36 include/webcpp/codecs/detail/core/operations.hpp
+82 −16 include/webcpp/codecs/detail/core/over.hpp
+44 −0 include/webcpp/codecs/detail/core/secrecy.hpp
+12 −1 include/webcpp/codecs/detail/core/size_maximum.hpp
+29 −7 include/webcpp/codecs/detail/core/sizes.hpp
+1 −7 include/webcpp/codecs/detail/core/tokens.hpp
+14 −2 test/Jamfile
+40 −0 test/allocation_test.cpp
+39 −4 test/armor_openssl_test.cpp
+134 −27 test/armor_stream_test.cpp
+342 −23 test/armor_test.cpp
+184 −74 test/constant_time/paths.hpp
+77 −0 test/declared_reason_encode_builds_test.cpp
+33 −0 test/default_result_test.cpp
+10 −3 test/fuzz/Jamfile
+3 −0 test/fuzz/corpus/over_value/armor_crlf
+3 −0 test/fuzz/corpus/over_value/armor_past_bound
+3 −0 test/fuzz/corpus/over_value/armor_past_bound_bad_symbol
+3 −0 test/fuzz/corpus/over_value/armor_version_1
+3 −0 test/fuzz/corpus/over_value/armor_version_2
+1 −0 test/fuzz/corpus/over_value/empty
+1 −0 test/fuzz/corpus/over_value/hex_odd_digits_last_g
+1 −0 test/fuzz/corpus/over_value/hex_past_bound
+1 −0 test/fuzz/corpus/over_value/hex_record_version_1
+1 −0 test/fuzz/corpus/over_value/hex_record_version_2
+188 −0 test/fuzz/over_value_fuzz.cpp
+16 −0 test/messages/Jamfile
+16 −0 test/messages/armor_label_invalid/Jamfile
+36 −0 test/messages/armor_label_invalid/armor_label_invalid.cpp
+16 −0 test/messages/declared_byte_input/Jamfile
+41 −0 test/messages/declared_byte_input/declared_byte_input.cpp
+16 −0 test/messages/declared_byte_input_reason/Jamfile
+26 −0 test/messages/declared_byte_input_reason/declared_byte_input_reason.cpp
+16 −0 test/messages/declared_byte_result/Jamfile
+30 −0 test/messages/declared_byte_result/declared_byte_result.cpp
+16 −0 test/messages/declared_check_conversion/Jamfile
+24 −0 test/messages/declared_check_conversion/declared_check_conversion.cpp
+16 −0 test/messages/declared_composition_inner/Jamfile
+25 −0 test/messages/declared_composition_inner/declared_composition_inner.cpp
+16 −0 test/messages/declared_reason_composition/Jamfile
+27 −0 test/messages/declared_reason_composition/declared_reason_composition.cpp
+16 −0 test/messages/declared_reason_decode/Jamfile
+31 −0 test/messages/declared_reason_decode/declared_reason_decode.cpp
+16 −0 test/messages/declared_unlisted/Jamfile
+24 −0 test/messages/declared_unlisted/declared_unlisted.cpp
+16 −0 test/messages/declared_unlisted_buffer/Jamfile
+30 −0 test/messages/declared_unlisted_buffer/declared_unlisted_buffer.cpp
+16 −0 test/messages/declared_unlisted_decode/Jamfile
+29 −0 test/messages/declared_unlisted_decode/declared_unlisted_decode.cpp
+16 −0 test/messages/declared_unlisted_size/Jamfile
+23 −0 test/messages/declared_unlisted_size/declared_unlisted_size.cpp
+16 −0 test/messages/declared_unlisted_token/Jamfile
+24 −0 test/messages/declared_unlisted_token/declared_unlisted_token.cpp
+16 −0 test/messages/declared_without_value_codec/Jamfile
+49 −0 test/messages/declared_without_value_codec/declared_without_value_codec.cpp
+16 −0 test/messages/decode_bound_below_encoded/Jamfile
+82 −0 test/messages/decode_bound_below_encoded/decode_bound_below_encoded.cpp
+3 −3 test/messages/refused_input/refused_input.cpp
+16 −0 test/messages/typed_decode_text_from_bytes/Jamfile
+56 −0 test/messages/typed_decode_text_from_bytes/typed_decode_text_from_bytes.cpp
+84 −0 test/noexcept_test.cpp
+428 −0 test/over_test.cpp
+145 −0 test/support/armor_labels.hpp
+462 −0 test/support/bounded_records.hpp
+140 −0 test/support/declared_byte_values.hpp
+280 −0 test/support/declared_values.hpp
+391 −0 test/typed_decode_test.cpp
+48 −0 test/value_codec_test.cpp
+329 −0 test/value_formats_test.cpp
2 changes: 1 addition & 1 deletion libs/crypto
Submodule crypto updated 189 files
Loading