summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-09-08 14:15:10 +0200
committerJustus Winter <justus@sequoia-pgp.org>2021-09-08 14:15:10 +0200
commita524620bdd72eebeeb2db5d9da690396445b0ad3 (patch)
tree1b23b093fe6c6d38e44fcc62a92d90ef4818ae8c /openpgp
parent4c3902d15fb7c1089c1b72b63c882837fa54d63d (diff)
openpgp: Avoid magic constant.
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/crypto/backend/nettle/asymmetric.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/openpgp/src/crypto/backend/nettle/asymmetric.rs b/openpgp/src/crypto/backend/nettle/asymmetric.rs
index 0b15efde..fd4df9be 100644
--- a/openpgp/src/crypto/backend/nettle/asymmetric.rs
+++ b/openpgp/src/crypto/backend/nettle/asymmetric.rs
@@ -98,8 +98,8 @@ impl Signer for KeyPair {
res?;
Ok(mpi::Signature::EdDSA {
- r: MPI::new(&sig[..32]),
- s: MPI::new(&sig[32..]),
+ r: MPI::new(&sig[..ed25519::ED25519_KEY_SIZE]),
+ s: MPI::new(&sig[ed25519::ED25519_KEY_SIZE..]),
})
},
_ => Err(