summaryrefslogtreecommitdiff
path: root/crates/tor-llcrypto/src/pk.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix name of clippy lint to unchecked_time_subtraction (2)Ian Jackson2025-11-061-1/+1
| | | | Run maint/add_warning
* tor-(hs|ll)crypto: deftly derive ConstantTimeEqhashcatHitman2025-09-231-1/+23
| | | | | | | | | | | | | | | | | This is my initial attempt at deriving ConstantTimeEq and PartialEq. This includes the previously missed HsSvcNtorKeypair and HsClientDescEncKeypair types. In tor-llcrypto, a few implementations still had to be done by hand, and some types which previously derived normal PartialEq now derive it with ConstantTimeEq. I could not figure out how to properly set up the macros such that they could be used both in the current crate and in others, so for the moment they are duplicated. Just so I can get feedback. Ideally, this will be replaced with a better solution before merge. Signed-off-by: hashcatHitman <[email protected]>
* tor-llcrypto: as_bytes on curve25519::StaticSecrethashcatHitman2025-09-161-0/+4
| | | | | | | Exposed `as_bytes` on `curve25519::StaticSecret`, allowing a shared reference to the secret bytes rather than needing to copy them. Signed-off-by: hashcatHitman <[email protected]>
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-1/+1
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* llcrypto: add an rng compatibility shim for dalek-cryptoNick Mathewson2025-03-181-2/+8
| | | | | | | | | dalek-cryptography is still on rand 0.8, so we need a compatibility shim for the Rng. Fortunately, since we merged interface-abstraction-of-the-daleks (!2868), we no longer need to propagate this compatibility layer throughout our codebase.
* Wrap x25519-dalek types.Nick Mathewson2025-03-171-10/+103
| | | | | | | With this change, we'll no longer need to expose the types from dalek-cryptography as part of our API, and we'll have more freedom to switch curve25519 implementations, or to upgrade to a newer `rand` ahead of their schedule.
* Run maint/add_warning.Nick Mathewson2024-03-131-0/+1
|
* Fix a typo in comment in llcrypto.Nick Mathewson2023-11-291-1/+1
|
* Clarify and downgrade TODO about ReusableSecret.Nick Mathewson2023-11-291-1/+8
|
* Convert to the latest versions of dalek-cryptographyNick Mathewson2023-11-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes that we have to adjust for are as follows: * In x25519-dalek: * `StaticSecret` is now behind a feature. * `StaticSecret::new` is deprecated in favor of `StaticSecret::random_from_rng`. * StaticSecret no longer does its own clamping. * In ed25519-dalek: * `SecretKey` has (in effect) been renamed to `SigningKey`. The name `SecretKey` is now an alias for `[u8; 32]`. * `SigningKey` is effectively a keypair, since it contains a public key as well. * `PublicKey` has been renamed to `VerifyingKey`. * The functions to extract a signing key and verifying key have been renamed as you might expect. * `ExpandedSecretKey` has been moved to `hasmat` and no longer implements `sign`. * `ExpanededSecretKey` now has as its elements a scalar and a hash prefix. * Various functions that took `&[u8]` now take `&[u8; N]`. * We no longer need a wrapper for older versions of rand. There is a single test in tor-keymgr that does not pass. I've marked it as ignore for now, in hopes that @gabi-250 can help me figure it out. This closes #808. There are several changes I want to make before we merge, however. They are marked with TODO DALEK.
* tor-hscrypto: derive the impl of Debug for curve25519::StaticKeypairIan Jackson2023-11-231-10/+4
|
* tor-llcrypto: Implement Clone and Debug for StaticKeypair.Gabriela Moldovan2023-09-251-0/+11
|
* tor-llcrypto: Add a type for x25519 StaticSecret/PublicKey keypairs.Gabriela Moldovan2023-09-251-0/+9
|
* Run maint/add_warning to add lint block everywhereIan Jackson2023-08-231-0/+1
|
* Run maint/add_warning to actually apply new lint allowsIan Jackson2023-07-101-0/+1
|
* Allow clippy::unchecked_duration_subtraction in testsNick Mathewson2023-01-271-0/+1
| | | | | This panics on error, and we're fine with a panic on misbehavior in tests.
* test lint blocks: Add many many automaticallyIan Jackson2022-12-121-0/+8
| | | | | This is precisely the result of running the rune in maint/adhoc-add-lint-blocks.
* fix/silence clippy lints in test modulesDaniel Eades2021-09-081-0/+1
|
* Move all crates into a `crates` subdirectory.Nick Mathewson2021-08-271-0/+94
This will cause some pain for now, but now is really the best time to do this kind of thing.