1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#[cfg(feature = "ecdsa")]
#[cfg_attr(docsrs, doc(cfg(feature = "ecdsa")))]
pub mod ecdsa;
use elliptic_curve::consts::U32;
#[cfg(feature = "pkcs8")]
use crate::pkcs8;
#[derive(Clone, Debug, Default, Eq, PartialEq, PartialOrd, Ord)]
pub struct BrainpoolP384r1;
impl elliptic_curve::Curve for BrainpoolP384r1 {
    
    type FieldSize = U32;
}
impl elliptic_curve::weierstrass::Curve for BrainpoolP384r1 {}
impl elliptic_curve::weierstrass::PointCompression for BrainpoolP384r1 {
    const COMPRESS_POINTS: bool = false;
}
#[cfg(feature = "pkcs8")]
impl elliptic_curve::AlgorithmParameters for BrainpoolP384r1 {
    const OID: pkcs8::ObjectIdentifier = pkcs8::ObjectIdentifier::new("1.3.36.3.3.2.8.1.1.11");
}
pub type FieldBytes = elliptic_curve::FieldBytes<BrainpoolP384r1>;
pub type EncodedPoint = elliptic_curve::sec1::EncodedPoint<BrainpoolP384r1>;
#[cfg(feature = "zeroize")]
#[cfg_attr(docsrs, doc(cfg(feature = "zeroize")))]
pub type SecretKey = elliptic_curve::SecretKey<BrainpoolP384r1>;
#[cfg(feature = "zeroize")]
#[cfg_attr(docsrs, doc(cfg(feature = "zeroize")))]
pub type SecretBytes = elliptic_curve::SecretBytes<BrainpoolP384r1>;
#[cfg(feature = "zeroize")]
impl elliptic_curve::SecretValue for BrainpoolP384r1 {
    type Secret = SecretBytes;
    
    fn from_secret_bytes(bytes: &FieldBytes) -> Option<SecretBytes> {
        Some(bytes.clone().into())
    }
}
#[cfg(feature = "zeroize")]
impl elliptic_curve::sec1::ValidatePublicKey for BrainpoolP384r1 {}