2020-01-22 11:31:27 -08:00
|
|
|
[package]
|
|
|
|
name = "ed25519-zebra"
|
2023-11-22 09:50:54 -08:00
|
|
|
# Refer to DEVELOPERS.md for guidance on making new releases.
|
2023-09-11 11:28:01 -07:00
|
|
|
version = "4.0.3"
|
2023-06-08 03:23:21 -07:00
|
|
|
rust-version = "1.65.0"
|
2023-07-06 18:08:44 -07:00
|
|
|
authors = ["Henry de Valence <hdevalence@hdevalence.ca>", "Zcash Foundation <zebra@zfnd.org>"]
|
2020-01-22 14:57:26 -08:00
|
|
|
license = "MIT OR Apache-2.0"
|
2020-01-22 11:31:27 -08:00
|
|
|
edition = "2018"
|
2020-01-22 14:57:26 -08:00
|
|
|
repository = "https://github.com/ZcashFoundation/ed25519-zebra"
|
|
|
|
description = "Zcash-flavored Ed25519 for use in Zebra."
|
2022-05-05 06:40:29 -07:00
|
|
|
resolver = "2"
|
2020-01-22 14:57:26 -08:00
|
|
|
|
|
|
|
[package.metadata.docs.rs]
|
2020-06-17 14:28:12 -07:00
|
|
|
features = ["nightly"]
|
2020-01-22 11:31:27 -08:00
|
|
|
|
|
|
|
[dependencies]
|
2023-09-11 10:48:06 -07:00
|
|
|
# "digest" (pre-1.0.0) is exempt from SemVer but breaking changes will bump minor versions
|
|
|
|
# (see https://github.com/dalek-cryptography/curve25519-dalek/tree/main/curve25519-dalek#stable)
|
2023-08-21 11:39:10 -07:00
|
|
|
# (see https://github.com/dalek-cryptography/curve25519-dalek/tree/main/curve25519-dalek#public-api-semver-exemptions)
|
2023-09-11 10:48:06 -07:00
|
|
|
# so only allow patch changes inside known compatible range
|
|
|
|
curve25519-dalek = { version = ">= 4.0, < 4.2", default-features = false, features = ["alloc", "digest", "zeroize", "precomputed-tables"] }
|
2024-04-19 13:09:15 -07:00
|
|
|
der = { version = "0.7.9", optional = true }
|
2023-11-27 10:56:57 -08:00
|
|
|
ed25519 = { version = "2.2.3", default-features = false }
|
2023-11-27 11:18:59 -08:00
|
|
|
hashbrown = "0.14.3"
|
Add DER & PEM support for SigningKeySeed and VerificationKeyBytes (RFC 8410) (#46)
* Add DER & PEM support for SigningKeySeed and VerificationKeyBytes (RFC 8410)
- Add encoding to and decoding from DER bytes and PEM strings for SigningKeySeed and VerificationKeyBytes.
- Add some functions so that the Java code mirrors, to a certain degree, the JDK 15 interface for Ed25519 keys and signatures.
- Add encoding and decoding for signatures (technically identity functions).
- Miscellaneous cleanup.
* Accommodate extra octet string in private key DER bytes
- In RFC 8410, DER-encoded private keys are in an octet string that's encapsulated by another octet string. Add the extra octet string, and adjust tests as necessary.
- In the tests, use the private key from RFC 8410, Sect. 10.3.
* Update pkcs8 to 0.7.0
* Cleanup
- Enhance PEM capabilities for SigningKey and VerificationKeyBytes. This also allowed for some tests to be simplified.
- From -> TryFrom for some VerificationKeyBytes impls.
* Upgrade JNI Rust bindings to PKCS8 0.7.5
- Make necessary changes to support the newer crate.
- Fix an unrelated compiler warning.
* More fixups
- Get code to compile after updating to the latest Rust.
- Fix a couple of failing tests (add LF to expected encoding output).
* Major update
- Update pkcs8 crate to 0.10.0, and update code as required to support the crate. This includes supporting the Decode(Public/Private)Key and Encode(Public/Private)Key traits so as to take advantage of Ed25519 DER and PEM code in the crate.
- Add the latest ed25519 crate (2.2.0) to support KeypairBytes and other features.
- Remove the signature code and implement Signature (Signer and Verifier traits) from the "signatures" crate included with the pkcs8 crate.
- Update the JNI code. This includes mandating Scala 3 usage.
- Minor cleanup (including warning fixes) and changes to make the code a bit clearer.
A follow-up commit will clean up the tests and probably add support for v2 private DER keys.
* Further code cleanup
- Update pkcs8 crate to 0.10.1.
- Fix PEM feature code.
- Update Ed25519 JNI code as needed.
- Remove dead code.
- Re-enable a couple of unit tests.
Note that a couple of Ed25519 JNI unit tests are still failing. A follow-up PR will have the fix.
* Add missing DER/PEM files for unit tests
* Add JNI comments to resolve publisher warnings
When executing `sbt publishLocal` and generating a JAR file, there are warnings regarding some functions not having public comments. Add public comments as needed.
* JNI README update
* Comment touchup
* Review fixups
- Finish adding PEM/PKCS8 tags and cfg items as needed to separate the features from default compilation.
- Revert some minor name changes.
- Make the JNI README more precise with regards to requirements.
- Add ARM64 macOS support to JNI. Untested but it should work, and it doesn't break Intel Macs.
- Miscellaneous cleanup, including fixing cargo and sbt warnings.
* Upgrade jni crate to 0.20.0
The 0.21.X crates feature a major refactor that breaks the code. Don't upgrade to them until some issues are resolved. (See https://github.com/jni-rs/jni-rs/issues/432 for more info.)
* Upgrade jni crate to 0.21.1
- A path forward to upgrading to 0.21.X was suggested by the jni-rs library developer (https://github.com/jni-rs/jni-rs/issues/439#issuecomment-1493074721). Upgrade the code, improving the safety of the JNI code.
- Cargo.toml fixups.
* cargo clippy / cargo fmt cleanup
Also do minor JNI README cleanup.
* Use an export to clean up some tests a bit
---------
Co-authored-by: Douglas Roark <douglas.roark@gemini.com>
2023-04-21 13:56:37 -07:00
|
|
|
hex = { version = "0.4.3", default-features = false, features = ["alloc"] }
|
|
|
|
pkcs8 = { version = "0.10.1", optional = true, features = ["alloc", "pem"] }
|
2023-03-15 07:04:32 -07:00
|
|
|
rand_core = "0.6"
|
2023-07-05 11:26:02 -07:00
|
|
|
serde = { version = "1", default-features = false, optional = true, features = ["derive"] }
|
2023-03-15 07:04:32 -07:00
|
|
|
sha2 = { version = "0.10", default-features = false }
|
2023-11-27 06:40:06 -08:00
|
|
|
subtle = { version = "2.5.0", default-features = false }
|
2023-11-27 11:03:46 -08:00
|
|
|
zeroize = { version = "1.7", features = [ "zeroize_derive" ] }
|
2020-01-22 14:57:26 -08:00
|
|
|
|
2020-01-22 16:58:18 -08:00
|
|
|
[dev-dependencies]
|
2021-03-25 18:41:22 -07:00
|
|
|
rand = "0.8"
|
2020-01-23 17:13:48 -08:00
|
|
|
bincode = "1"
|
2023-06-07 06:46:34 -07:00
|
|
|
criterion = "0.5"
|
2020-07-06 19:43:29 -07:00
|
|
|
ed25519-zebra-legacy = { package = "ed25519-zebra", version = "1" }
|
2022-01-12 21:01:54 -08:00
|
|
|
color-eyre = "0.6"
|
2023-12-18 13:38:14 -08:00
|
|
|
once_cell = "1.19"
|
2020-01-22 16:58:18 -08:00
|
|
|
|
2020-01-22 14:57:26 -08:00
|
|
|
[features]
|
|
|
|
nightly = []
|
2022-05-05 06:40:29 -07:00
|
|
|
default = ["serde", "std"]
|
2023-06-08 03:23:21 -07:00
|
|
|
pem = ["der", "ed25519/pem"]
|
Add DER & PEM support for SigningKeySeed and VerificationKeyBytes (RFC 8410) (#46)
* Add DER & PEM support for SigningKeySeed and VerificationKeyBytes (RFC 8410)
- Add encoding to and decoding from DER bytes and PEM strings for SigningKeySeed and VerificationKeyBytes.
- Add some functions so that the Java code mirrors, to a certain degree, the JDK 15 interface for Ed25519 keys and signatures.
- Add encoding and decoding for signatures (technically identity functions).
- Miscellaneous cleanup.
* Accommodate extra octet string in private key DER bytes
- In RFC 8410, DER-encoded private keys are in an octet string that's encapsulated by another octet string. Add the extra octet string, and adjust tests as necessary.
- In the tests, use the private key from RFC 8410, Sect. 10.3.
* Update pkcs8 to 0.7.0
* Cleanup
- Enhance PEM capabilities for SigningKey and VerificationKeyBytes. This also allowed for some tests to be simplified.
- From -> TryFrom for some VerificationKeyBytes impls.
* Upgrade JNI Rust bindings to PKCS8 0.7.5
- Make necessary changes to support the newer crate.
- Fix an unrelated compiler warning.
* More fixups
- Get code to compile after updating to the latest Rust.
- Fix a couple of failing tests (add LF to expected encoding output).
* Major update
- Update pkcs8 crate to 0.10.0, and update code as required to support the crate. This includes supporting the Decode(Public/Private)Key and Encode(Public/Private)Key traits so as to take advantage of Ed25519 DER and PEM code in the crate.
- Add the latest ed25519 crate (2.2.0) to support KeypairBytes and other features.
- Remove the signature code and implement Signature (Signer and Verifier traits) from the "signatures" crate included with the pkcs8 crate.
- Update the JNI code. This includes mandating Scala 3 usage.
- Minor cleanup (including warning fixes) and changes to make the code a bit clearer.
A follow-up commit will clean up the tests and probably add support for v2 private DER keys.
* Further code cleanup
- Update pkcs8 crate to 0.10.1.
- Fix PEM feature code.
- Update Ed25519 JNI code as needed.
- Remove dead code.
- Re-enable a couple of unit tests.
Note that a couple of Ed25519 JNI unit tests are still failing. A follow-up PR will have the fix.
* Add missing DER/PEM files for unit tests
* Add JNI comments to resolve publisher warnings
When executing `sbt publishLocal` and generating a JAR file, there are warnings regarding some functions not having public comments. Add public comments as needed.
* JNI README update
* Comment touchup
* Review fixups
- Finish adding PEM/PKCS8 tags and cfg items as needed to separate the features from default compilation.
- Revert some minor name changes.
- Make the JNI README more precise with regards to requirements.
- Add ARM64 macOS support to JNI. Untested but it should work, and it doesn't break Intel Macs.
- Miscellaneous cleanup, including fixing cargo and sbt warnings.
* Upgrade jni crate to 0.20.0
The 0.21.X crates feature a major refactor that breaks the code. Don't upgrade to them until some issues are resolved. (See https://github.com/jni-rs/jni-rs/issues/432 for more info.)
* Upgrade jni crate to 0.21.1
- A path forward to upgrading to 0.21.X was suggested by the jni-rs library developer (https://github.com/jni-rs/jni-rs/issues/439#issuecomment-1493074721). Upgrade the code, improving the safety of the JNI code.
- Cargo.toml fixups.
* cargo clippy / cargo fmt cleanup
Also do minor JNI README cleanup.
* Use an export to clean up some tests a bit
---------
Co-authored-by: Douglas Roark <douglas.roark@gemini.com>
2023-04-21 13:56:37 -07:00
|
|
|
pkcs8 = ["dep:pkcs8"]
|
2023-06-08 03:23:21 -07:00
|
|
|
serde = ["dep:serde", "ed25519/serde"]
|
2023-11-27 06:40:06 -08:00
|
|
|
std = ["ed25519/std", "subtle/std"]
|
2020-01-28 17:11:43 -08:00
|
|
|
|
|
|
|
[[test]]
|
|
|
|
name = "rfc8032"
|
|
|
|
|
|
|
|
[[test]]
|
|
|
|
name = "unit_tests"
|
|
|
|
|
|
|
|
[[test]]
|
|
|
|
name = "batch"
|
2020-01-28 21:36:48 -08:00
|
|
|
|
|
|
|
[[bench]]
|
|
|
|
name = "bench"
|
|
|
|
harness = false
|