summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-02-20 19:24:37 +0100
committerJustus Winter <justus@sequoia-pgp.org>2020-02-20 19:24:37 +0100
commit291edaec90f6ef8dd6daab96478bd7d33a0066ab (patch)
treef631d7c50c300beea776b4edbdb27ba27ef90d22
parentf8d10cf720697be099ef1e9a3d72462e50e82f28 (diff)
openpgp: Typo.
-rw-r--r--ipc/src/gnupg.rs2
-rw-r--r--openpgp/src/crypto/asymmetric.rs8
-rw-r--r--openpgp/src/crypto/keygrip.rs4
-rw-r--r--openpgp/src/crypto/mpis.rs74
-rw-r--r--openpgp/src/crypto/sexp.rs6
-rw-r--r--openpgp/src/parse/mpis.rs18
-rw-r--r--openpgp/src/serialize/mod.rs16
-rw-r--r--openpgp/src/types/mod.rs30
-rw-r--r--tool/src/commands/dump.rs8
9 files changed, 83 insertions, 83 deletions
diff --git a/ipc/src/gnupg.rs b/ipc/src/gnupg.rs
index dd74ef77..79e2a862 100644
--- a/ipc/src/gnupg.rs
+++ b/ipc/src/gnupg.rs
@@ -751,7 +751,7 @@ impl<'a> crypto::Decryptor for KeyPair<'a> {
match (self.public.mpis(), ciphertext) {
(PublicKey::RSA { .. }, Ciphertext::RSA { .. })
- | (PublicKey::Elgamal { .. }, Ciphertext::Elgamal { .. })
+ | (PublicKey::ElGamal { .. }, Ciphertext::ElGamal { .. })
| (PublicKey::ECDH { .. }, Ciphertext::ECDH { .. }) => {
let mut a = Agent::connect_to(&self.agent_socket).wait()?;
let sk = a.decrypt(self.public, ciphertext).wait()?;
diff --git a/openpgp/src/crypto/asymmetric.rs b/openpgp/src/crypto/asymmetric.rs
index 73d9f4df..b8c6ecd9 100644
--- a/openpgp/src/crypto/asymmetric.rs
+++ b/openpgp/src/crypto/asymmetric.rs
@@ -252,11 +252,11 @@ impl Decryptor for KeyPair {
}
}
- (PublicKey::Elgamal{ .. },
- mpis::SecretKeyMaterial::Elgamal{ .. },
- mpis::Ciphertext::Elgamal{ .. }) =>
+ (PublicKey::ElGamal{ .. },
+ mpis::SecretKeyMaterial::ElGamal{ .. },
+ mpis::Ciphertext::ElGamal{ .. }) =>
return Err(
- Error::UnsupportedPublicKeyAlgorithm(ElgamalEncrypt).into()),
+ Error::UnsupportedPublicKeyAlgorithm(ElGamalEncrypt).into()),
(PublicKey::ECDH{ .. },
mpis::SecretKeyMaterial::ECDH { .. },
diff --git a/openpgp/src/crypto/keygrip.rs b/openpgp/src/crypto/keygrip.rs
index d1b8148e..77ea3868 100644
--- a/openpgp/src/crypto/keygrip.rs
+++ b/openpgp/src/crypto/keygrip.rs
@@ -117,7 +117,7 @@ impl PublicKey {
hash_sexp_mpi(&mut hash, 'y', b"", y);
},
- &Elgamal { ref p, ref g, ref y } => {
+ &ElGamal { ref p, ref g, ref y } => {
hash_sexp_mpi(&mut hash, 'p', b"\x00", p);
hash_sexp_mpi(&mut hash, 'g', b"", g);
hash_sexp_mpi(&mut hash, 'y', b"", y);
@@ -257,7 +257,7 @@ mod tests {
", false).unwrap().into(),
}, Keygrip(*b"\xc6\x39\x83\x1a\x43\xe5\x05\x5d\xc6\xd8\
\x4a\xa6\xf9\xeb\x23\xbf\xa9\x12\x2d\x5b")),
- (PublicKey::Elgamal {
+ (PublicKey::ElGamal {
p: from_hex(
"00B93B93386375F06C2D38560F3B9C6D6D7B7506B20C1773F73F8DE56E6CD65D\
F48DFAAA1E93F57A2789B168362A0F787320499F0B2461D3A4268757A7B27517\
diff --git a/openpgp/src/crypto/mpis.rs b/openpgp/src/crypto/mpis.rs
index 894c7679..30204fb6 100644
--- a/openpgp/src/crypto/mpis.rs
+++ b/openpgp/src/crypto/mpis.rs
@@ -309,8 +309,8 @@ pub enum PublicKey {
y: MPI,
},
- /// Elgamal public key.
- Elgamal {
+ /// ElGamal public key.
+ ElGamal {
/// Prime of the ring Zp.
p: MPI,
/// Generator of Zp.
@@ -335,7 +335,7 @@ pub enum PublicKey {
q: MPI,
},
- /// Elliptic curve Elgamal public key.
+ /// Elliptic curve ElGamal public key.
ECDH {
/// Curve we're using.
curve: Curve,
@@ -372,7 +372,7 @@ impl PublicKey {
2 + p.value.len() + 2 + q.value.len() +
2 + g.value.len() + 2 + y.value.len(),
- &Elgamal { ref p, ref g, ref y } =>
+ &ElGamal { ref p, ref g, ref y } =>
2 + p.value.len() +
2 + g.value.len() + 2 + y.value.len(),
@@ -414,7 +414,7 @@ impl PublicKey {
match self {
&RSA { ref n,.. } => Some(n.bits()),
&DSA { ref p,.. } => Some(p.bits()),
- &Elgamal { ref p,.. } => Some(p.bits()),
+ &ElGamal { ref p,.. } => Some(p.bits()),
&EdDSA { ref curve,.. } => curve.bits(),
&ECDSA { ref curve,.. } => curve.bits(),
&ECDH { ref curve,.. } => curve.bits(),
@@ -429,7 +429,7 @@ impl PublicKey {
match self {
RSA { .. } => Some(PublicKeyAlgorithm::RSAEncryptSign),
DSA { .. } => Some(PublicKeyAlgorithm::DSA),
- Elgamal { .. } => Some(PublicKeyAlgorithm::ElgamalEncrypt),
+ ElGamal { .. } => Some(PublicKeyAlgorithm::ElGamalEncrypt),
EdDSA { .. } => Some(PublicKeyAlgorithm::EdDSA),
ECDSA { .. } => Some(PublicKeyAlgorithm::ECDSA),
ECDH { .. } => Some(PublicKeyAlgorithm::ECDH),
@@ -461,7 +461,7 @@ impl Arbitrary for PublicKey {
y: MPI::arbitrary(g),
},
- 2 => Elgamal {
+ 2 => ElGamal {
p: MPI::arbitrary(g),
g: MPI::arbitrary(g),
y: MPI::arbitrary(g),
@@ -515,8 +515,8 @@ pub enum SecretKeyMaterial {
x: ProtectedMPI,
},
- /// Elgamal secret key.
- Elgamal {
+ /// ElGamal secret key.
+ ElGamal {
/// Secret key log_g(y) in Zp.
x: ProtectedMPI,
},
@@ -533,7 +533,7 @@ pub enum SecretKeyMaterial {
scalar: ProtectedMPI,
},
- /// Elliptic curve Elgamal secret key.
+ /// Elliptic curve ElGamal secret key.
ECDH {
/// Secret scalar.
scalar: ProtectedMPI,
@@ -556,8 +556,8 @@ impl fmt::Debug for SecretKeyMaterial {
write!(f, "RSA {{ d: {:?}, p: {:?}, q: {:?}, u: {:?} }}", d, p, q, u),
&SecretKeyMaterial::DSA{ ref x } =>
write!(f, "DSA {{ x: {:?} }}", x),
- &SecretKeyMaterial::Elgamal{ ref x } =>
- write!(f, "Elgamal {{ x: {:?} }}", x),
+ &SecretKeyMaterial::ElGamal{ ref x } =>
+ write!(f, "ElGamal {{ x: {:?} }}", x),
&SecretKeyMaterial::EdDSA{ ref scalar } =>
write!(f, "EdDSA {{ scalar: {:?} }}", scalar),
&SecretKeyMaterial::ECDSA{ ref scalar } =>
@@ -573,8 +573,8 @@ impl fmt::Debug for SecretKeyMaterial {
f.write_str("RSA { <Redacted> }"),
&SecretKeyMaterial::DSA{ .. } =>
f.write_str("DSA { <Redacted> }"),
- &SecretKeyMaterial::Elgamal{ .. } =>
- f.write_str("Elgamal { <Redacted> }"),
+ &SecretKeyMaterial::ElGamal{ .. } =>
+ f.write_str("ElGamal { <Redacted> }"),
&SecretKeyMaterial::EdDSA{ .. } =>
f.write_str("EdDSA { <Redacted> }"),
&SecretKeyMaterial::ECDSA{ .. } =>
@@ -603,7 +603,7 @@ impl PartialOrd for SecretKeyMaterial {
match sk {
&SecretKeyMaterial::RSA{ .. } => 0,
&SecretKeyMaterial::DSA{ .. } => 1,
- &SecretKeyMaterial::Elgamal{ .. } => 2,
+ &SecretKeyMaterial::ElGamal{ .. } => 2,
&SecretKeyMaterial::EdDSA{ .. } => 3,
&SecretKeyMaterial::ECDSA{ .. } => 4,
&SecretKeyMaterial::ECDH{ .. } => 5,
@@ -628,8 +628,8 @@ impl PartialOrd for SecretKeyMaterial {
,&SecretKeyMaterial::DSA{ x: ref x2 }) => {
secure_mpi_cmp(x1, x2)
}
- (&SecretKeyMaterial::Elgamal{ x: ref x1 }
- ,&SecretKeyMaterial::Elgamal{ x: ref x2 }) => {
+ (&SecretKeyMaterial::ElGamal{ x: ref x1 }
+ ,&SecretKeyMaterial::ElGamal{ x: ref x2 }) => {
secure_mpi_cmp(x1, x2)
}
(&SecretKeyMaterial::EdDSA{ scalar: ref scalar1 }
@@ -697,7 +697,7 @@ impl SecretKeyMaterial {
&DSA { ref x } => 2 + x.value.len(),
- &Elgamal { ref x } => 2 + x.value.len(),
+ &ElGamal { ref x } => 2 + x.value.len(),
&EdDSA { ref scalar } => 2 + scalar.value.len(),
@@ -718,7 +718,7 @@ impl SecretKeyMaterial {
match self {
RSA { .. } => Some(PublicKeyAlgorithm::RSAEncryptSign),
DSA { .. } => Some(PublicKeyAlgorithm::DSA),
- Elgamal { .. } => Some(PublicKeyAlgorithm::ElgamalEncrypt),
+ ElGamal { .. } => Some(PublicKeyAlgorithm::ElGamalEncrypt),
EdDSA { .. } => Some(PublicKeyAlgorithm::EdDSA),
ECDSA { .. } => Some(PublicKeyAlgorithm::ECDSA),
ECDH { .. } => Some(PublicKeyAlgorithm::ECDH),
@@ -748,7 +748,7 @@ impl Arbitrary for SecretKeyMaterial {
x: MPI::arbitrary(g).into(),
},
- 2 => SecretKeyMaterial::Elgamal {
+ 2 => SecretKeyMaterial::ElGamal {
x: MPI::arbitrary(g).into(),
},
@@ -781,15 +781,15 @@ pub enum Ciphertext {
c: MPI,
},
- /// Elgamal ciphertext
- Elgamal {
+ /// ElGamal ciphertext
+ ElGamal {
/// Ephemeral key.
e: MPI,
/// .
c: MPI,
},
- /// Elliptic curve Elgamal public key.
+ /// Elliptic curve ElGamal public key.
ECDH {
/// Ephemeral key.
e: MPI,
@@ -818,7 +818,7 @@ impl Ciphertext {
&RSA { ref c } =>
2 + c.value.len(),
- &Elgamal { ref e, ref c } =>
+ &ElGamal { ref e, ref c } =>
2 + e.value.len() + 2 + c.value.len(),
&ECDH { ref e, ref key } =>
@@ -842,7 +842,7 @@ impl Ciphertext {
// commented.
match self {
&RSA { .. } => Some(PublicKeyAlgorithm::RSAEncryptSign),
- &Elgamal { .. } => Some(PublicKeyAlgorithm::ElgamalEncrypt),
+ &ElGamal { .. } => Some(PublicKeyAlgorithm::ElGamalEncrypt),
&ECDH { .. } => Some(PublicKeyAlgorithm::ECDH),
&Unknown { .. } => None,
}
@@ -863,7 +863,7 @@ impl Arbitrary for Ciphertext {
c: MPI::arbitrary(g),
},
- 1 => Ciphertext::Elgamal {
+ 1 => Ciphertext::ElGamal {
e: MPI::arbitrary(g),
c: MPI::arbitrary(g)
},
@@ -897,8 +897,8 @@ pub enum Signature {
s: MPI,
},
- /// Elgamal signature.
- Elgamal {
+ /// ElGamal signature.
+ ElGamal {
/// `r` value.
r: MPI,
/// `s` value.
@@ -945,7 +945,7 @@ impl Signature {
&DSA { ref r, ref s } =>
2 + r.value.len() + 2 + s.value.len(),
- &Elgamal { ref r, ref s } =>
+ &ElGamal { ref r, ref s } =>
2 + r.value.len() + 2 + s.value.len(),
&EdDSA { ref r, ref s } =>
@@ -1028,9 +1028,9 @@ mod tests {
PublicKey::DSA { .. } =>
PublicKey::parse(
DSA, cur.into_inner()).unwrap(),
- PublicKey::Elgamal { .. } =>
+ PublicKey::ElGamal { .. } =>
PublicKey::parse(
- ElgamalEncrypt, cur.into_inner()).unwrap(),
+ ElGamalEncrypt, cur.into_inner()).unwrap(),
PublicKey::EdDSA { .. } =>
PublicKey::parse(
EdDSA, cur.into_inner()).unwrap(),
@@ -1095,9 +1095,9 @@ mod tests {
SecretKeyMaterial::ECDH { .. } =>
SecretKeyMaterial::parse(
ECDH, cur.into_inner()).unwrap(),
- SecretKeyMaterial::Elgamal { .. } =>
+ SecretKeyMaterial::ElGamal { .. } =>
SecretKeyMaterial::parse(
- ElgamalEncrypt, cur.into_inner()).unwrap(),
+ ElGamalEncrypt, cur.into_inner()).unwrap(),
SecretKeyMaterial::Unknown { .. } => unreachable!(),
};
@@ -1122,9 +1122,9 @@ mod tests {
Ciphertext::RSA { .. } =>
Ciphertext::parse(
RSAEncryptSign, cur.into_inner()).unwrap(),
- Ciphertext::Elgamal { .. } =>
+ Ciphertext::ElGamal { .. } =>
Ciphertext::parse(
- ElgamalEncrypt, cur.into_inner()).unwrap(),
+ ElGamalEncrypt, cur.into_inner()).unwrap(),
Ciphertext::ECDH { .. } =>
Ciphertext::parse(
ECDH, cur.into_inner()).unwrap(),
@@ -1155,9 +1155,9 @@ mod tests {
Signature::DSA { .. } =>
Signature::parse(
DSA, cur.into_inner()).unwrap(),
- Signature::Elgamal { .. } =>
+ Signature::ElGamal { .. } =>
Signature::parse(
- ElgamalEncryptSign, cur.into_inner()).unwrap(),
+ ElGamalEncryptSign, cur.into_inner()).unwrap(),
Signature::EdDSA { .. } =>
Signature::parse(
EdDSA, cur.into_inner()).unwrap(),
diff --git a/openpgp/src/crypto/sexp.rs b/openpgp/src/crypto/sexp.rs
index 9241a89d..4939059e 100644
--- a/openpgp/src/crypto/sexp.rs
+++ b/openpgp/src/crypto/sexp.rs
@@ -53,7 +53,7 @@ impl Sexp {
Sexp::String("a".into()),
Sexp::String(c.value().into())])])])),
- &Elgamal { ref e, ref c } =>
+ &ElGamal { ref e, ref c } =>
Ok(Sexp::List(vec![
Sexp::String("enc-val".into()),
Sexp::List(vec![
@@ -109,7 +109,7 @@ impl Sexp {
match value {
Sexp::String(ref s) => match recipient.mpis() {
- PublicKey::RSA { .. } | PublicKey::Elgamal { .. } if padding =>
+ PublicKey::RSA { .. } | PublicKey::ElGamal { .. } if padding =>
{
// The session key is padded. The format is
// described in g10/pubkey-enc.c (note that we,
@@ -154,7 +154,7 @@ impl Sexp {
Ok(s.to_vec().into())
},
- PublicKey::RSA { .. } | PublicKey::Elgamal { .. } => {
+ PublicKey::RSA { .. } | PublicKey::ElGamal { .. } => {
// The session key is not padded. Currently, this
// happens if the session key is decrypted using
// scdaemon.
diff --git a/openpgp/src/parse/mpis.rs b/openpgp/src/parse/mpis.rs
index 9e5bd939..4d0c84be 100644
--- a/openpgp/src/parse/mpis.rs
+++ b/openpgp/src/parse/mpis.rs
@@ -70,7 +70,7 @@ impl mpis::PublicKey {
})
}
- ElgamalEncrypt | ElgamalEncryptSign => {
+ ElGamalEncrypt | ElGamalEncryptSign => {
let p = MPI::parse("elgamal_public_p_len", "elgamal_public_p",
php)?;
let g = MPI::parse("elgamal_public_g_len", "elgamal_public_g",
@@ -78,7 +78,7 @@ impl mpis::PublicKey {
let y = MPI::parse("elgamal_public_y_len", "elgamal_public_y",
php)?;
- Ok(mpis::PublicKey::Elgamal {
+ Ok(mpis::PublicKey::ElGamal {
p: p,
g: g,
y: y,
@@ -234,11 +234,11 @@ impl mpis::SecretKeyMaterial {
})
}
- ElgamalEncrypt | ElgamalEncryptSign => {
+ ElGamalEncrypt | ElGamalEncryptSign => {
let x = MPI::parse("elgamal_secret_len", "elgamal_secret",
php)?;
- Ok(mpis::SecretKeyMaterial::Elgamal {
+ Ok(mpis::SecretKeyMaterial::ElGamal {
x: x.into(),
})
}
@@ -322,11 +322,11 @@ impl mpis::Ciphertext {
})
}
- ElgamalEncrypt | ElgamalEncryptSign => {
+ ElGamalEncrypt | ElGamalEncryptSign => {
let e = MPI::parse("elgamal_e_len", "elgamal_e", php)?;
let c = MPI::parse("elgamal_c_len", "elgamal_c", php)?;
- Ok(mpis::Ciphertext::Elgamal {
+ Ok(mpis::Ciphertext::ElGamal {
e: e,
c: c,
})
@@ -415,13 +415,13 @@ impl mpis::Signature {
})
}
- ElgamalEncryptSign => {
+ ElGamalEncryptSign => {
let r = MPI::parse("elgamal_sig_r_len",
"elgamal_sig_r", php)?;
let s = MPI::parse("elgamal_sig_s_len",
"elgamal_sig_s", php)?;
- Ok(mpis::Signature::Elgamal {
+ Ok(mpis::Signature::ElGamal {
r: r,
s: s,
})
@@ -465,7 +465,7 @@ impl mpis::Signature {
})
}
- RSAEncrypt | ElgamalEncrypt | ECDH => Err(Error::InvalidArgument(
+ RSAEncrypt | ElGamalEncrypt | ECDH => Err(Error::InvalidArgument(
format!("not a signature algorithm: {:?}", algo)).into()),
}
}
diff --git a/openpgp/src/serialize/mod.rs b/openpgp/src/serialize/mod.rs
index 69b3fe31..4c93777d 100644
--- a/openpgp/src/serialize/mod.rs
+++ b/openpgp/src/serialize/mod.rs
@@ -576,7 +576,7 @@ impl Serialize for crypto::mpis::PublicKey {
y.serialize(w)?;
}
- &Elgamal { ref p, ref g, ref y } => {
+ &ElGamal { ref p, ref g, ref y } => {
p.serialize(w)?;
g.serialize(w)?;
y.serialize(w)?;
@@ -626,7 +626,7 @@ impl SerializeInto for crypto::mpis::PublicKey {
+ y.serialized_len()
}
- &Elgamal { ref p, ref g, ref y } => {
+ &ElGamal { ref p, ref g, ref y } => {
p.serialized_len() + g.serialized_len() + y.serialized_len()
}
@@ -670,7 +670,7 @@ impl Serialize for crypto::mpis::SecretKeyMaterial {
x.serialize(w)?;
}
- &Elgamal{ ref x } => {
+ &ElGamal{ ref x } => {
x.serialize(w)?;
}
@@ -711,7 +711,7 @@ impl SerializeInto for crypto::mpis::SecretKeyMaterial {
x.serialized_len()
}
- &Elgamal{ ref x } => {
+ &ElGamal{ ref x } => {
x.serialized_len()
}
@@ -765,7 +765,7 @@ impl Serialize for crypto::mpis::Ciphertext {
c.serialize(w)?;
}
- &Elgamal{ ref e, ref c } => {
+ &ElGamal{ ref e, ref c } => {
e.serialize(w)?;
c.serialize(w)?;
}
@@ -797,7 +797,7 @@ impl SerializeInto for crypto::mpis::Ciphertext {
c.serialized_len()
}
- &Elgamal{ ref e, ref c } => {
+ &ElGamal{ ref e, ref c } => {
e.serialized_len() + c.serialized_len()
}
@@ -829,7 +829,7 @@ impl Serialize for crypto::mpis::Signature {
r.serialize(w)?;
s.serialize(w)?;
}
- &Elgamal { ref r, ref s } => {
+ &ElGamal { ref r, ref s } => {
r.serialize(w)?;
s.serialize(w)?;
}
@@ -864,7 +864,7 @@ impl SerializeInto for crypto::mpis::Signature {
&DSA { ref r, ref s } => {
r.serialized_len() + s.serialized_len()
}
- &Elgamal { ref r, ref s } => {
+ &ElGamal { ref r, ref s } => {
r.serialized_len() + s.serialized_len()
}
&EdDSA { ref r, ref s } => {
diff --git a/openpgp/src/types/mod.rs b/openpgp/src/types/mod.rs
index 4ba8916d..790cf6c0 100644
--- a/openpgp/src/types/mod.rs
+++ b/openpgp/src/types/mod.rs
@@ -53,19 +53,19 @@ pub enum PublicKeyAlgorithm {
#[deprecated(since = "rfc4880",
note = "Use `PublicKeyAlgorithm::RSAEncryptSign`.")]
RSASign,
- /// Elgamal (Encrypt-Only)
- ElgamalEncrypt,
+ /// ElGamal (Encrypt-Only)
+ ElGamalEncrypt,
/// DSA (Digital Signature Algorithm)
DSA,
/// Elliptic curve DH
ECDH,
/// Elliptic curve DSA
ECDSA,
- /// Elgamal (Encrypt or Sign)
+ /// ElGamal (Encrypt or Sign)
#[deprecated(since = "rfc4880",
note = "If you really must, use \
- `PublicKeyAlgorithm::ElgamalEncrypt`.")]
- ElgamalEncryptSign,
+ `PublicKeyAlgorithm::ElGamalEncrypt`.")]
+ ElGamalEncryptSign,
/// "Twisted" Edwards curve DSA
EdDSA,
/// Private algorithm identifier.
@@ -80,7 +80,7 @@ impl PublicKeyAlgorithm {
use self::PublicKeyAlgorithm::*;
#[allow(deprecated)]
match &self {
- RSAEncryptSign | RSASign | DSA | ECDSA | ElgamalEncryptSign
+ RSAEncryptSign | RSASign | DSA | ECDSA | ElGamalEncryptSign
| EdDSA => true,
_ => false,
}
@@ -91,8 +91,8 @@ impl PublicKeyAlgorithm {
use self::PublicKeyAlgorithm::*;
#[allow(deprecated)]
match &self {
- RSAEncryptSign | RSAEncrypt | ElgamalEncrypt | ECDH
- | ElgamalEncryptSign => true,
+ RSAEncryptSign | RSAEncrypt | ElGamalEncrypt | ECDH
+ | ElGamalEncryptSign => true,
_ => false,
}
}
@@ -104,7 +104,7 @@ impl PublicKeyAlgorithm {
match &self {
RSAEncryptSign | RSAEncrypt | RSASign | DSA | ECDH | ECDSA | EdDSA
=> true,
- ElgamalEncrypt | ElgamalEncryptSign | Private(_) | Unknown(_)
+ ElGamalEncrypt | ElGamalEncryptSign | Private(_) | Unknown(_)
=> false,
}
}
@@ -118,11 +118,11 @@ impl From<u8> for PublicKeyAlgorithm {
1 => RSAEncryptSign,
2 => RSAEncrypt,
3 => RSASign,
- 16 => ElgamalEncrypt,
+ 16 => ElGamalEncrypt,
17 => DSA,
18 => ECDH,
19 => ECDSA,
- 20 => ElgamalEncryptSign,
+ 20 => ElGamalEncryptSign,
22 => EdDSA,
100..=110 => Private(u),
u => Unknown(u),
@@ -138,11 +138,11 @@ impl From<PublicKeyAlgorithm> for u8 {
RSAEncryptSign => 1,
RSAEncrypt => 2,
RSASign => 3,
- ElgamalEncrypt => 16,
+ ElGamalEncrypt => 16,
DSA => 17,
ECDH => 18,
ECDSA => 19,
- ElgamalEncryptSign => 20,
+ ElGamalEncryptSign => 20,
EdDSA => 22,
Private(u) => u,
Unknown(u) => u,
@@ -158,10 +158,10 @@ impl fmt::Display for PublicKeyAlgorithm {
RSAEncryptSign => f.write_str("RSA (Encrypt or Sign)"),
RSAEncrypt => f.write_str("RSA Encrypt-Only"),
RSASign => f.write_str("RSA Sign-Only"),
- ElgamalEncrypt => f.write_str("Elgamal (Encrypt-Only)"),
+ ElGamalEncrypt => f.write_str("ElGamal (Encrypt-Only)"),
DSA => f.write_str("DSA (Digital Signature Algorithm)"),
ECDSA => f.write_str("ECDSA public key algorithm"),
- ElgamalEncryptSign => f.write_str("Elgamal (Encrypt or Sign)"),
+ ElGamalEncryptSign => f.write_str("ElGamal (Encrypt or Sign)"),
ECDH => f.write_str("ECDH public key algorithm"),
EdDSA => f.write_str("EdDSA Edwards-curve Digital Signature Algorithm"),
Private(u) =>
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs
index e8a0a970..022bfdf4 100644
--- a/tool/src/commands/dump.rs
+++ b/tool/src/commands/dump.rs
@@ -316,7 +316,7 @@ impl PacketDumper {
&[p.value(), q.value(), g.value(),
y.value()],
&["p", "q", "g", "y"])?,
- mpis::PublicKey::Elgamal { p, g, y } =>
+ mpis::PublicKey::ElGamal { p, g, y } =>
pd.dump_mpis(output, &ii,
&[p.value(), g.value(), y.value()],
&["p", "g", "y"])?,
@@ -371,7 +371,7 @@ impl PacketDumper {
mpis::SecretKeyMaterial::DSA { x } =>
pd.dump_mpis(output, &ii, &[x.value()],
&["x"])?,
- mpis::SecretKeyMaterial::Elgamal { x } =>
+ mpis::SecretKeyMaterial::ElGamal { x } =>
pd.dump_mpis(output, &ii, &[x.value()],
&["x"])?,
mpis::SecretKeyMaterial::EdDSA { scalar } =>
@@ -471,7 +471,7 @@ impl PacketDumper {
self.dump_mpis(output, &ii,
&[r.value(), s.value()],
&["r", "s"])?,
- mpis::Signature::Elgamal { r, s } =>
+ mpis::Signature::ElGamal { r, s } =>
self.dump_mpis(output, &ii,
&[r.value(), s.value()],
&["r", "s"])?,
@@ -583,7 +583,7 @@ impl PacketDumper {
self.dump_mpis(output, &ii,
&[c.value()],
&["c"])?,
- mpis::Ciphertext::Elgamal { e, c } =>
+ mpis::Ciphertext::ElGamal { e, c } =>
self.dump_mpis(output, &ii,
&[e.value(), c.value()],
&["e", "c"])?,