-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loading, storing, and generating DNSSEC keys #406
Commits on Oct 24, 2024
-
[sign] Define 'KeyPair' and impl key export
A private key converted into a 'KeyPair' can be exported in the conventional DNS format. This is an important step in implementing 'ldns-keygen' using 'domain'. It is up to the implementation modules to provide conversion to and from 'KeyPair'; some impls (e.g. for HSMs) won't support it at all.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 5ba8940 - Browse repository at this point
Copy the full SHA 5ba8940View commit details -
'Sign' is a more generic version of 'sign::key::SigningKey' that does not provide public key information. It does not try to abstract over all the functionality of a keypair, since that can depend on the underlying cryptographic implementation.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 4c10381 - Browse repository at this point
Copy the full SHA 4c10381View commit details -
[sign] Implement parsing from the DNS format
There are probably lots of bugs in this implementation, I'll add some tests soon.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for f33f775 - Browse repository at this point
Copy the full SHA f33f775View commit details -
[sign] Provide some error information
Also fixes 'cargo clippy' issues, particularly with the MSRV.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 1d97597 - Browse repository at this point
Copy the full SHA 1d97597View commit details -
[sign] Move 'KeyPair' to 'generic::SecretKey'
I'm going to add a corresponding 'PublicKey' type, at which point it becomes important to differentiate from the generic representations and actual cryptographic implementations.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for fa306e9 - Browse repository at this point
Copy the full SHA fa306e9View commit details -
[sign/generic] Add 'PublicKey'
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 56dec85 - Browse repository at this point
Copy the full SHA 56dec85View commit details -
[sign] Rewrite the 'ring' module to use the 'Sign' trait
Key generation, for now, will only be provided by the OpenSSL backend (coming soon). However, generic keys (for RSA/SHA-256 or Ed25519) can be imported into the Ring backend and used freely.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 5f8e28f - Browse repository at this point
Copy the full SHA 5f8e28fView commit details -
Implement DNSSEC signing with OpenSSL
The OpenSSL backend supports import from and export to generic secret keys, making the formatting and parsing machinery for them usable. The next step is to implement generation of keys.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 46b67e9 - Browse repository at this point
Copy the full SHA 46b67e9View commit details -
[sign/openssl] Implement key generation
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 2451e1b - Browse repository at this point
Copy the full SHA 2451e1bView commit details -
[sign/openssl] Test key generation and import/export
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 159a94a - Browse repository at this point
Copy the full SHA 159a94aView commit details -
[sign/openssl] Add support for ECDSA
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 4fb6084 - Browse repository at this point
Copy the full SHA 4fb6084View commit details -
arya dradjica committed
Oct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 6bc9bce - Browse repository at this point
Copy the full SHA 6bc9bceView commit details -
[sign/openssl] Implement the 'Sign' trait
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for be3e169 - Browse repository at this point
Copy the full SHA be3e169View commit details -
arya dradjica committed
Oct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 836812a - Browse repository at this point
Copy the full SHA 836812aView commit details -
Ensure 'openssl' dep supports 3.x.x
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 66290a5 - Browse repository at this point
Copy the full SHA 66290a5View commit details -
[workflows/ci] Use 'vcpkg' instead of vendoring OpenSSL
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 2a1489f - Browse repository at this point
Copy the full SHA 2a1489fView commit details -
Ensure 'openssl' dep exposes necessary interfaces
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for e8d208f - Browse repository at this point
Copy the full SHA e8d208fView commit details -
[workflows/ci] Record location of 'vcpkg'
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 045d52b - Browse repository at this point
Copy the full SHA 045d52bView commit details -
[workflows/ci] Use a YAML def for 'VCPKG_ROOT'
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 460679b - Browse repository at this point
Copy the full SHA 460679bView commit details -
[workflows/ci] Fix a vcpkg triplet to use
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 21ba8d3 - Browse repository at this point
Copy the full SHA 21ba8d3View commit details -
Upgrade openssl to 0.10.57 for bitflags 2.x
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 4195dd4 - Browse repository at this point
Copy the full SHA 4195dd4View commit details -
[workflows/ci] Use dynamic linking for vcpkg openssl
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 4f4f6ff - Browse repository at this point
Copy the full SHA 4f4f6ffView commit details -
[workflows/ci] Correctly annotate 'vcpkg'
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 608cbea - Browse repository at this point
Copy the full SHA 608cbeaView commit details -
[sign/openssl] Implement exporting public keys
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 632c1b0 - Browse repository at this point
Copy the full SHA 632c1b0View commit details -
[sign/ring] Implement exporting public keys
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 4350d8b - Browse repository at this point
Copy the full SHA 4350d8bView commit details -
[sign/generic] Test (de)serialization for generic secret keys
There were bugs in the Base64 encoding/decoding that are not worth trying to debug; there's a perfectly usable Base64 implementation in the crate already.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 4c46552 - Browse repository at this point
Copy the full SHA 4c46552View commit details -
[sign] Thoroughly test import/export in both backends
I had to swap out the RSA key since 'ring' found it to be too small.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for fc95523 - Browse repository at this point
Copy the full SHA fc95523View commit details -
[sign] Remove debugging code and satisfy clippy
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 22e00a6 - Browse repository at this point
Copy the full SHA 22e00a6View commit details -
[sign] Account for CR LF in tests
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 94b3e47 - Browse repository at this point
Copy the full SHA 94b3e47View commit details -
[sign/openssl] Fix bugs in the signing procedure
- RSA signatures were being made with an unspecified padding scheme. - ECDSA signatures were being output in ASN.1 DER format, instead of the fixed-size format required by DNSSEC (and output by 'ring'). - Tests for signature failures are now added for both backends.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 68a5656 - Browse repository at this point
Copy the full SHA 68a5656View commit details -
Most functions have been renamed. The public key types have been moved to the 'validate' module (which 'sign' now depends on), and they have been outfitted with conversions (e.g. to and from DNSKEY records). Importing a generic key into an OpenSSL or Ring key now requires the public key to also be available. In both implementations, the pair are checked for consistency -- this ensures that both are uncorrupted and that keys have not been mixed up. This also allows the Ring backend to support ECDSA keys (although key generation is still difficult). The 'PublicKey' and 'PrivateKey' enums now store their array data in 'Box'. This has two benefits: it is easier to securely manage memory on the heap (since the compiler will not copy it around the stack); and the smaller sizes of the types is beneficial (although negligibly) to performance.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for a71c339 - Browse repository at this point
Copy the full SHA a71c339View commit details -
Move 'sign' and 'validate' to unstable feature gates
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 824c8e3 - Browse repository at this point
Copy the full SHA 824c8e3View commit details -
[workflows/ci] Document the vcpkg env vars
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 6d8c29e - Browse repository at this point
Copy the full SHA 6d8c29eView commit details -
Rename public/secret key interfaces to '*Raw*'
This makes space for higher-level interfaces which track DNSKEY flags information (and possibly key rollover information).
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 82a05aa - Browse repository at this point
Copy the full SHA 82a05aaView commit details -
[sign/ring] Store the RNG in an 'Arc'
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 980fe5a - Browse repository at this point
Copy the full SHA 980fe5aView commit details -
[validate] Enhance 'Signature' API
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 35ff06c - Browse repository at this point
Copy the full SHA 35ff06cView commit details -
[validate] Add high-level 'Key' type
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 95cc462 - Browse repository at this point
Copy the full SHA 95cc462View commit details -
[sign/openssl] Pad ECDSA keys when exporting
Tests would spuriously fail when generated keys were only 31 bytes in size.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 3cec8cb - Browse repository at this point
Copy the full SHA 3cec8cbView commit details -
[validate] Implement 'Key::key_tag()'
This is more efficient than allocating a DNSKEY record and computing the key tag there.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 8682b6d - Browse repository at this point
Copy the full SHA 8682b6dView commit details -
[validate] Correct bit offsets for flags
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 57d20d9 - Browse repository at this point
Copy the full SHA 57d20d9View commit details -
[validate] Implement support for digests
The test keys have been rotated and replaced with KSKs since they have associated DS records I can verify digests against. I also expanded Ring's testing to include ECDSA keys. The validate module tests SHA-1 keys as well, which aren't supported by 'sign'.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for f37c862 - Browse repository at this point
Copy the full SHA f37c862View commit details -
[validate] Enhance BIND format conversion for 'Key'
Public keys in the BIND format can now have multiple lines (even with comments). Keys can also be directly written into the BIND format and round-trips to and from the BIND format are now tested.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 7f01a5f - Browse repository at this point
Copy the full SHA 7f01a5fView commit details -
arya dradjica committed
Oct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for b4103a3 - Browse repository at this point
Copy the full SHA b4103a3View commit details -
[sign] Handle errors more responsibly
The 'openssl' and 'ring' modules should now follow the contributing guidelines regarding module layout and formatting.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 81720c3 - Browse repository at this point
Copy the full SHA 81720c3View commit details -
arya dradjica committed
Oct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 1e00479 - Browse repository at this point
Copy the full SHA 1e00479View commit details -
[sign/openssl] Replace panics with results
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for d26a433 - Browse repository at this point
Copy the full SHA d26a433View commit details -
arya dradjica committed
Oct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 6968cb9 - Browse repository at this point
Copy the full SHA 6968cb9View commit details -
[sign] Introduce 'common' for abstracting backends
This is useful for abstracting over OpenSSL and Ring, so that Ring can be used whenever possible while OpenSSL is used as a fallback. This is useful for clients that just wish to support everything.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 99cb9ef - Browse repository at this point
Copy the full SHA 99cb9efView commit details -
[sign/generic] add top-level doc comment
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 8321d50 - Browse repository at this point
Copy the full SHA 8321d50View commit details -
[validate] debug bind format errors
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for a25be56 - Browse repository at this point
Copy the full SHA a25be56View commit details -
[validate] more debug statements
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 59650a4 - Browse repository at this point
Copy the full SHA 59650a4View commit details -
[validate] format DNSKEYs using 'ZonefileFmt'
The 'Dnskey' impl of 'fmt::Display' was no longer accurate to the zone file format because 'SecAlg' now prints '<code>(<mnemonic>)'.
arya dradjica committedOct 24, 2024 Configuration menu - View commit details
-
Copy full SHA for 0f54a8d - Browse repository at this point
Copy the full SHA 0f54a8dView commit details
Commits on Oct 25, 2024
-
Reorganize crate features in 'Cargo.toml'
arya dradjica committedOct 25, 2024 Configuration menu - View commit details
-
Copy full SHA for 5a3de59 - Browse repository at this point
Copy the full SHA 5a3de59View commit details -
[sign] Add key generation support for Ring
It's a bit hacky because it relies on specific byte indices within the generated PKCS8 documents (internally, Ring basically just concatenates bytes to form the documents, and we use the same indices). However, any change to the document format should be caught by the tests here.
arya dradjica committedOct 25, 2024 Configuration menu - View commit details
-
Copy full SHA for 12a70af - Browse repository at this point
Copy the full SHA 12a70afView commit details -
[sign] Make OpenSSL support optional
Now that Ring and OpenSSL support all mandatory algorithms, OpenSSL is no longer required in order to provide signing functionality.
arya dradjica committedOct 25, 2024 Configuration menu - View commit details
-
Copy full SHA for 2f2fb58 - Browse repository at this point
Copy the full SHA 2f2fb58View commit details
Commits on Oct 29, 2024
-
[sign] Rename 'generic::SecretKey' to 'KeyBytes'
arya dradjica committedOct 29, 2024 Configuration menu - View commit details
-
Copy full SHA for a4316b5 - Browse repository at this point
Copy the full SHA a4316b5View commit details -
[sign] Rename 'SecretKey' to 'KeyPair' in all impls
arya dradjica committedOct 29, 2024 Configuration menu - View commit details
-
Copy full SHA for e0a4fc0 - Browse repository at this point
Copy the full SHA e0a4fc0View commit details -
Merge branch 'main' into dnssec-key
arya dradjica committedOct 29, 2024 Configuration menu - View commit details
-
Copy full SHA for 31462cc - Browse repository at this point
Copy the full SHA 31462ccView commit details -
[sign] Rename 'KeyBytes' to 'SecretKeyBytes'
For consistency with the upcoming 'PublicKeyBytes'.
arya dradjica committedOct 29, 2024 Configuration menu - View commit details
-
Copy full SHA for 48e178a - Browse repository at this point
Copy the full SHA 48e178aView commit details -
[validate] Rename 'RawPublicKey' to 'PublicKeyBytes'
arya dradjica committedOct 29, 2024 Configuration menu - View commit details
-
Copy full SHA for daa96d8 - Browse repository at this point
Copy the full SHA daa96d8View commit details -
[sign/ring] Remove redundant imports
arya dradjica committedOct 29, 2024 Configuration menu - View commit details
-
Copy full SHA for 221f163 - Browse repository at this point
Copy the full SHA 221f163View commit details
Commits on Oct 30, 2024
-
[sign,validate] Add 'display_as_bind()' to key bytes types
arya dradjica committedOct 30, 2024 Configuration menu - View commit details
-
Copy full SHA for 61bc3aa - Browse repository at this point
Copy the full SHA 61bc3aaView commit details -
[sign,validate] remove unused imports
arya dradjica committedOct 30, 2024 Configuration menu - View commit details
-
Copy full SHA for 55716a4 - Browse repository at this point
Copy the full SHA 55716a4View commit details
Commits on Oct 31, 2024
-
arya dradjica committed
Oct 31, 2024 Configuration menu - View commit details
-
Copy full SHA for 7831260 - Browse repository at this point
Copy the full SHA 7831260View commit details
Commits on Nov 4, 2024
-
[lib] Rewrite feature flag documentation
arya dradjica committedNov 4, 2024 Configuration menu - View commit details
-
Copy full SHA for 7c9ee4c - Browse repository at this point
Copy the full SHA 7c9ee4cView commit details -
[workflows/ci] Use 'apt-get' instead of 'apt'
arya dradjica committedNov 4, 2024 Configuration menu - View commit details
-
Copy full SHA for cea9ae3 - Browse repository at this point
Copy the full SHA cea9ae3View commit details -
[sign] Clarify documentation as per @ximon18
arya dradjica committedNov 4, 2024 Configuration menu - View commit details
-
Copy full SHA for 354bf0a - Browse repository at this point
Copy the full SHA 354bf0aView commit details -
[sign] Use 'secrecy' to protect private keys
arya dradjica committedNov 4, 2024 Configuration menu - View commit details
-
Copy full SHA for ca10361 - Browse repository at this point
Copy the full SHA ca10361View commit details
Commits on Nov 5, 2024
-
[sign] Improve documentation and examples
arya dradjica committedNov 5, 2024 Configuration menu - View commit details
-
Copy full SHA for 01104f3 - Browse repository at this point
Copy the full SHA 01104f3View commit details