From 142034138eab68d118058c2966585957ad1a4b2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kj=C3=A4ll?= Date: Mon, 22 May 2023 20:35:10 +0200 Subject: [PATCH 1/3] support loading and retrieving kyber 512/768/1024 keys --- botan-sys/src/pubkey.rs | 15 ++++ botan/src/pubkey.rs | 177 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 192 insertions(+) diff --git a/botan-sys/src/pubkey.rs b/botan-sys/src/pubkey.rs index 2ba4bd3..ac2c72e 100644 --- a/botan-sys/src/pubkey.rs +++ b/botan-sys/src/pubkey.rs @@ -211,6 +211,21 @@ extern "C" { pub fn botan_privkey_x25519_get_privkey(key: botan_privkey_t, output: *mut u8) -> c_int; pub fn botan_pubkey_x25519_get_pubkey(key: botan_pubkey_t, pubkey: *mut u8) -> c_int; + pub fn botan_privkey_load_kyber512(key: *mut botan_privkey_t, privkey: *const u8) -> c_int; + pub fn botan_pubkey_load_kyber512(key: *mut botan_pubkey_t, pubkey: *const u8) -> c_int; + pub fn botan_privkey_kyber512_get_privkey(key: botan_privkey_t, output: *mut u8) -> c_int; + pub fn botan_pubkey_kyber512_get_pubkey(key: botan_pubkey_t, pubkey: *mut u8) -> c_int; + + pub fn botan_privkey_load_kyber768(key: *mut botan_privkey_t, privkey: *const u8) -> c_int; + pub fn botan_pubkey_load_kyber768(key: *mut botan_pubkey_t, pubkey: *const u8) -> c_int; + pub fn botan_privkey_kyber768_get_privkey(key: botan_privkey_t, output: *mut u8) -> c_int; + pub fn botan_pubkey_kyber768_get_pubkey(key: botan_pubkey_t, pubkey: *mut u8) -> c_int; + + pub fn botan_privkey_load_kyber1024(key: *mut botan_privkey_t, privkey: *const u8) -> c_int; + pub fn botan_pubkey_load_kyber1024(key: *mut botan_pubkey_t, pubkey: *const u8) -> c_int; + pub fn botan_privkey_kyber1024_get_privkey(key: botan_privkey_t, output: *mut u8) -> c_int; + pub fn botan_pubkey_kyber1024_get_pubkey(key: botan_pubkey_t, pubkey: *mut u8) -> c_int; + pub fn botan_privkey_load_ecdsa( key: *mut botan_privkey_t, scalar: botan_mp_t, diff --git a/botan/src/pubkey.rs b/botan/src/pubkey.rs index 48d738f..cd02908 100644 --- a/botan/src/pubkey.rs +++ b/botan/src/pubkey.rs @@ -109,6 +109,48 @@ impl Privkey { Ok(Privkey { obj }) } + /// Load a kyber 512 private key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0x42; 800]; + /// let key = botan::Privkey::load_kyber512(&v).unwrap(); + /// ``` + #[cfg(feature = "botan3")] + pub fn load_kyber512(key: &[u8]) -> Result { + let obj = botan_init!(botan_privkey_load_kyber512, key.as_ptr())?; + Ok(Privkey { obj }) + } + + /// Load a kyber 768 private key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0x42; 1184]; + /// let key = botan::Privkey::load_kyber768(&v).unwrap(); + /// ``` + #[cfg(feature = "botan3")] + pub fn load_kyber768(key: &[u8]) -> Result { + let obj = botan_init!(botan_privkey_load_kyber768, key.as_ptr())?; + Ok(Privkey { obj }) + } + + /// Load a kyber 1024 private key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0x42; 1568]; + /// let key = botan::Privkey::load_kyber1024(&v).unwrap(); + /// ``` + #[cfg(feature = "botan3")] + pub fn load_kyber1024(key: &[u8]) -> Result { + let obj = botan_init!(botan_privkey_load_kyber1024, key.as_ptr())?; + Ok(Privkey { obj }) + } + /// Load a PKCS#1 encoded RSA private key pub fn load_rsa_pkcs1(pkcs1: &[u8]) -> Result { let obj = botan_init!(botan_privkey_load_rsa_pkcs1, pkcs1.as_ptr(), pkcs1.len())?; @@ -455,6 +497,54 @@ impl Privkey { Ok(out) } + /// Get the Kyber512 private key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0xd6, 0xec, 0xcd, 0x63, 0x5a, 0x4f, 0x19, 0xd8, 0x02, 0x56, 0xbc, 0x9c, 0xa3, 0xc2, 0x3d, 0xeb, 0x78, 0x3e, 0x2e, 0x16, 0x93, 0x7e, 0xa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0x78, 0x77, 0x9c, 0x98, 0x22, 0x31, 0x5d, 0xaf, 0xc5, 0x57, 0x53, 0xe9, 0x8c, 0x8e, 0xd3, 0x22, 0x1f, 0x2b, 0x32, 0x20, 0x80, 0x5c, 0x8a, 0x28, 0x98, 0x33, 0x55, 0x20, 0x7d, 0xa3, 0x6f, 0xb7, 0x2f, 0x9b, 0xc8, 0x5c, 0x0a, 0x13, 0xb9, 0xd0, 0x41, 0x58, 0x6f, 0xd5, 0x83, 0xfe, 0xb1, 0x2a, 0xfd, 0x5a, 0x40, 0x2d, 0xd3, 0x3b, 0x43, 0x54, 0x3f, 0x5f, 0xa4, 0xeb, 0x43, 0x6c, 0x8d, 0x23, 0x49, 0x7b, 0x31, 0x27, 0x9a, 0x8b, 0x71, 0x5f, 0x91, 0x2f, 0x30, 0xa1, 0x81, 0x66, 0x62, 0x70, 0x91, 0x3b, 0xbd, 0x72, 0x59, 0x8e, 0xb9, 0xcd, 0x65, 0xa6, 0xda, 0x68, 0x0f, 0x5c, 0x6b, 0x3e, 0x2a, 0x2e, 0xa6, 0xc9, 0xc4, 0x76, 0xfc, 0x49, 0x37, 0xb0, 0x13, 0xc9, 0x93, 0xa7, 0x93, 0xd6, 0xc0, 0xab, 0x99, 0x60, 0x69, 0x5b, 0xa8, 0x38, 0xf6, 0x49, 0xda, 0x53, 0x9c, 0xa3, 0xd0]; + /// let key = botan::Privkey::load_kyber512(&v).unwrap(); + /// let v2 = key.get_kyber512_key().unwrap(); + /// assert_eq!(v, v2); + /// ``` + pub fn get_kyber512_key(&self) -> Result> { + let mut out = vec![0; 1632]; + botan_call!(botan_privkey_kyber512_get_privkey, self.obj, out.as_mut_ptr())?; + Ok(out) + } + + /// Get the Kyber768 private key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0x46, 0x23, 0x96, 0xf6, 0xb2, 0x1f, 0xf6, 0x25, 0xb9, 0x6b, 0x4b, 0x1f, 0x5c, 0x3a, 0x38, 0xb3, 0xc8, 0x07, 0x08, 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xc1, 0xfe, 0xba, 0x87, 0x9b, 0xec, 0x54, 0x81, 0x2c, 0x2a, 0xff, 0xa0, 0x12, 0x97, 0x3b, 0x70, 0x0a, 0xd4, 0x8e, 0x27, 0x10, 0x78, 0x28, 0x08, 0x64, 0x26, 0x86, 0x00, 0xa7, 0xaa, 0x30, 0x9e, 0xaa, 0x10, 0x98, 0x75, 0x0a, 0x0f, 0x8a, 0x52, 0x2e, 0xb9, 0x29, 0x57, 0x7b, 0x41, 0x2f, 0x78, 0x55, 0x61, 0x36, 0x88, 0xb7, 0x2f, 0x9b, 0xc8, 0x5c, 0x0a, 0x13, 0xb9, 0xd0, 0x41, 0x58, 0x6f, 0xd5, 0x83, 0xfe, 0xb1, 0x2a, 0xfd, 0x5a, 0x40, 0x2d, 0xd3, 0x3b, 0x43, 0x54, 0x3f, 0x5f, 0xa4, 0xeb, 0x43, 0x6c, 0x8d, 0x75, 0x30, 0x0c, 0xab, 0x06, 0x66, 0xec, 0x12, 0x94, 0xf1, 0x4a, 0xeb, 0x07, 0x43, 0x4c, 0x98, 0x84, 0xba, 0x44, 0x00, 0x3e, 0xcd, 0xb4, 0x83, 0x91, 0x83, 0x82, 0x1a, 0x24, 0x85, 0xa7, 0xc6, 0x3e, 0x2a, 0x2e, 0xa6, 0xc9, 0xc4, 0x76, 0xfc, 0x49, 0x37, 0xb0, 0x13, 0xc9, 0x93, 0xa7, 0x93, 0xd6, 0xc0, 0xab, 0x99, 0x60, 0x69, 0x5b, 0xa8, 0x38, 0xf6, 0x49, 0xda, 0x53, 0x9c, 0xa3, 0xd0]; + /// let key = botan::Privkey::load_kyber768(&v).unwrap(); + /// let v2 = key.get_kyber768_key().unwrap(); + /// assert_eq!(v, v2); + /// ``` + pub fn get_kyber768_key(&self) -> Result> { + let mut out = vec![0; 2400]; + botan_call!(botan_privkey_kyber768_get_privkey, self.obj, out.as_mut_ptr())?; + Ok(out) + } + + /// Get the Kyber1024 private key + /// + /// # Examples + /// + /// ``` + /// let v = vec![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 0x4d, 0xda, 0x86, 0xed, 0xb6, 0x06, 0xb6, 0x43, 0x73, 0xab, 0xb6, 0x68, 0x3b, 0x56, 0x94, 0x96, 0x61, 0xab, 0x60, 0xc0, 0x11, 0xe1, 0x4c, 0x2b, 0x23, 0xc8, 0x92, 0x35, 0x87, 0xa9, 0x74, 0xcc, 0x79, 0x57, 0x4c, 0x82, 0x95, 0x62, 0x10, 0x91, 0x80, 0x1d, 0x37, 0x23, 0x97, 0x57, 0x85, 0x58, 0x31, 0x69, 0xc3, 0x58, 0xd1, 0x82, 0x59, 0x6c, 0x34, 0x4b, 0x22, 0x96, 0x4a, 0x40, 0x95, 0x8b, 0x22, 0x72, 0xba, 0xfb, 0x0f, 0xfd, 0x2b, 0xcc, 0xe4, 0xb1, 0x4f, 0x02, 0x10, 0xcb, 0xc8, 0x14, 0x47, 0x6f, 0x40, 0x47, 0xf4, 0x80, 0x56, 0x83, 0x96, 0x74, 0x2b, 0x01, 0x23, 0x32, 0xa1, 0xa1, 0x19, 0x10, 0x56, 0xdf, 0xb9, 0xb4, 0x3a, 0x75, 0x7b, 0xa6, 0xac, 0x37, 0xbc, 0x66, 0x62, 0xe4, 0x33, 0xca, 0xf1, 0x59, 0x83, 0x95, 0xe6, 0x4f, 0xa9, 0xa7, 0x2f, 0x3b, 0x71, 0x00, 0x6a, 0xeb, 0x8e, 0xb3, 0x73, 0x76, 0xfd, 0xd6, 0x17, 0x4a, 0xe0, 0x60, 0x5a, 0x6b, 0x53, 0x2a, 0xb6, 0x14, 0xf0, 0x26, 0x41, 0xae, 0x56, 0x3b, 0xf2, 0x30, 0x19, 0x00, 0xf4, 0x01, 0xed, 0xd3, 0xb4, 0x31, 0xd3, 0x90, 0xa9, 0xea, 0x4a, 0x2b, 0x36, 0x9b, 0xcf, 0xf4, 0xb8, 0x38, 0xe8, 0x4a, 0x88, 0x79, 0x91, 0xa1, 0x67, 0xc8, 0x68, 0xcc, 0x9b, 0xa1, 0x6b, 0x3c, 0x31, 0x89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x3a, 0x3a, 0xae, 0x26, 0xa7, 0xaf, 0xbd, 0x99, 0x62, 0xed, 0x60, 0xa9, 0xdd, 0xe9, 0x5b, 0x4b, 0xf8, 0xac, 0x7a, 0x47, 0x49, 0x3c, 0xf6, 0x1e, 0xe3, 0xf2, 0x9b, 0xa0, 0x46, 0xce, 0x15, 0xa1, 0x76, 0x3f, 0x0c, 0x21, 0xfa, 0xba, 0x24, 0x67, 0x00, 0xad, 0x54, 0x09, 0xb0, 0xad, 0xdc, 0xcc, 0x97, 0x79, 0xa4, 0xd1, 0xfc, 0x45, 0xec, 0x26, 0x1f, 0x04, 0x8b, 0x9c, 0x9d, 0xaa, 0x38, 0xc9, 0xec, 0x22, 0x8b, 0x65, 0x05, 0xe8, 0x90, 0x52, 0x26, 0xb3, 0x84, 0x86, 0x80, 0x20, 0x59, 0xc2, 0xc5, 0xc8, 0x96, 0x01, 0x56, 0x06, 0x34, 0xcb, 0x13, 0x37, 0xb1, 0x31, 0x53, 0x65, 0x14, 0x48, 0x42, 0xbc, 0x40, 0x5a, 0x29, 0x2e, 0x68, 0x3c, 0xaf, 0xa4, 0x51, 0x45, 0x26, 0x94, 0x5c, 0x4d, 0xfb, 0x68, 0xee, 0x2a, 0xcd, 0xb8, 0xb7, 0x95, 0x32, 0x83, 0x66, 0x96, 0xd5, 0x31, 0x25, 0xa0, 0x45, 0xbd, 0xbb, 0x8a, 0x3b, 0xcc, 0x81, 0x23, 0x08, 0x3d, 0x1e, 0x68, 0x2c, 0x5b, 0xd7, 0x82, 0x0c, 0x76, 0xc4, 0x48, 0x35, 0x11, 0x51, 0x47, 0x4f, 0x69, 0xd6, 0x01, 0xd7, 0x70, 0x8d, 0xbb, 0x2c, 0x97, 0x9d, 0x77, 0x52, 0x74, 0x94, 0xb6, 0x85, 0x20, 0xa8, 0xff, 0x66, 0xc3, 0x41, 0x62, 0xca, 0x2a, 0xec, 0x80, 0x72, 0xa2, 0xa5, 0x1f, 0xf2, 0x59, 0x38, 0x96, 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da, 0x53, 0x9c, 0xa3, 0xd0]; + /// let key = botan::Privkey::load_kyber1024(&v).unwrap(); + /// let v2 = key.get_kyber1024_key().unwrap(); + /// assert_eq!(v, v2); + /// ``` + pub fn get_kyber1024_key(&self) -> Result> { + let mut out = vec![0; 3168]; + botan_call!(botan_privkey_kyber1024_get_privkey, self.obj, out.as_mut_ptr())?; + Ok(out) + } + /// Sign a message using the specified padding method pub fn sign( &self, @@ -582,6 +672,45 @@ impl Pubkey { Ok(Pubkey { obj }) } + /// Load an Kyber512 key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0x42; 1632]; + /// let key = botan::Pubkey::load_kyber512(&v).unwrap(); + /// ``` + pub fn load_kyber512(key: &[u8]) -> Result { + let obj = botan_init!(botan_pubkey_load_kyber512, key.as_ptr())?; + Ok(Pubkey { obj }) + } + + /// Load an Kyber768 key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0x42; 2400]; + /// let key = botan::Pubkey::load_kyber768(&v).unwrap(); + /// ``` + pub fn load_kyber768(key: &[u8]) -> Result { + let obj = botan_init!(botan_pubkey_load_kyber768, key.as_ptr())?; + Ok(Pubkey { obj }) + } + + /// Load an Kyber1024 key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0x42; 3168]; + /// let key = botan::Pubkey::load_kyber1024(&v).unwrap(); + /// ``` + pub fn load_kyber1024(key: &[u8]) -> Result { + let obj = botan_init!(botan_pubkey_load_kyber1024, key.as_ptr())?; + Ok(Pubkey { obj }) + } + /// Return estimated bit strength of this key pub fn estimated_strength(&self) -> Result { botan_usize!(botan_pubkey_estimated_strength, self.obj) @@ -689,6 +818,54 @@ impl Pubkey { Ok(out) } + /// Get an Kyber512 key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0x42; 800]; + /// let key = botan::Pubkey::load_kyber512(&v).unwrap(); + /// let v2 = key.get_kyber512_key().unwrap(); + /// assert_eq!(v, v2); + /// ``` + pub fn get_kyber512_key(&self) -> Result> { + let mut out = vec![0; 800]; + botan_call!(botan_pubkey_kyber512_get_pubkey, self.obj, out.as_mut_ptr())?; + Ok(out) + } + + /// Get an Kyber768 key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0x42; 1184]; + /// let key = botan::Pubkey::load_kyber768(&v).unwrap(); + /// let v2 = key.get_kyber768_key().unwrap(); + /// assert_eq!(v, v2); + /// ``` + pub fn get_kyber768_key(&self) -> Result> { + let mut out = vec![0; 1184]; + botan_call!(botan_pubkey_kyber768_get_pubkey, self.obj, out.as_mut_ptr())?; + Ok(out) + } + + /// Get an Kyber1024 key + /// + /// # Examples + /// + /// ``` + /// let v = vec![0x42; 1568]; + /// let key = botan::Pubkey::load_kyber1024(&v).unwrap(); + /// let v2 = key.get_kyber1024_key().unwrap(); + /// assert_eq!(v, v2); + /// ``` + pub fn get_kyber1024_key(&self) -> Result> { + let mut out = vec![0; 1568]; + botan_call!(botan_pubkey_kyber1024_get_pubkey, self.obj, out.as_mut_ptr())?; + Ok(out) + } + /// Encrypt a message using the specified padding method pub fn encrypt( &self, From bc2aa67ad63f118b5a034ab528975453398a9019 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kj=C3=A4ll?= Date: Sat, 27 May 2023 14:21:49 +0200 Subject: [PATCH 2/3] updated to work with the kyber bindings that isn't per-size --- botan-sys/src/pubkey.rs | 18 +---- botan/src/pubkey.rs | 168 +++++++++++++--------------------------- 2 files changed, 56 insertions(+), 130 deletions(-) diff --git a/botan-sys/src/pubkey.rs b/botan-sys/src/pubkey.rs index ac2c72e..edc042a 100644 --- a/botan-sys/src/pubkey.rs +++ b/botan-sys/src/pubkey.rs @@ -211,20 +211,10 @@ extern "C" { pub fn botan_privkey_x25519_get_privkey(key: botan_privkey_t, output: *mut u8) -> c_int; pub fn botan_pubkey_x25519_get_pubkey(key: botan_pubkey_t, pubkey: *mut u8) -> c_int; - pub fn botan_privkey_load_kyber512(key: *mut botan_privkey_t, privkey: *const u8) -> c_int; - pub fn botan_pubkey_load_kyber512(key: *mut botan_pubkey_t, pubkey: *const u8) -> c_int; - pub fn botan_privkey_kyber512_get_privkey(key: botan_privkey_t, output: *mut u8) -> c_int; - pub fn botan_pubkey_kyber512_get_pubkey(key: botan_pubkey_t, pubkey: *mut u8) -> c_int; - - pub fn botan_privkey_load_kyber768(key: *mut botan_privkey_t, privkey: *const u8) -> c_int; - pub fn botan_pubkey_load_kyber768(key: *mut botan_pubkey_t, pubkey: *const u8) -> c_int; - pub fn botan_privkey_kyber768_get_privkey(key: botan_privkey_t, output: *mut u8) -> c_int; - pub fn botan_pubkey_kyber768_get_pubkey(key: botan_pubkey_t, pubkey: *mut u8) -> c_int; - - pub fn botan_privkey_load_kyber1024(key: *mut botan_privkey_t, privkey: *const u8) -> c_int; - pub fn botan_pubkey_load_kyber1024(key: *mut botan_pubkey_t, pubkey: *const u8) -> c_int; - pub fn botan_privkey_kyber1024_get_privkey(key: botan_privkey_t, output: *mut u8) -> c_int; - pub fn botan_pubkey_kyber1024_get_pubkey(key: botan_pubkey_t, pubkey: *mut u8) -> c_int; + pub fn botan_privkey_load_kyber(key: *mut botan_privkey_t, privkey: *const u8, key_len: usize) -> c_int; + pub fn botan_pubkey_load_kyber(key: *mut botan_pubkey_t, privkey: *const u8, key_len: usize) -> c_int; + pub fn botan_privkey_view_kyber_raw_key(key: botan_privkey_t, ctx: botan_view_ctx, view: botan_view_bin_fn) -> c_int; + pub fn botan_pubkey_view_kyber_raw_key(key: botan_pubkey_t, ctx: botan_view_ctx, view: botan_view_bin_fn) -> c_int; pub fn botan_privkey_load_ecdsa( key: *mut botan_privkey_t, diff --git a/botan/src/pubkey.rs b/botan/src/pubkey.rs index cd02908..e2fc479 100644 --- a/botan/src/pubkey.rs +++ b/botan/src/pubkey.rs @@ -109,45 +109,32 @@ impl Privkey { Ok(Privkey { obj }) } - /// Load a kyber 512 private key + /// Load a kyber private key /// /// # Examples /// /// ``` - /// let v = vec![0x42; 800]; - /// let key = botan::Privkey::load_kyber512(&v).unwrap(); + /// let v = vec![0x42; 1632]; + /// let key512 = botan::Privkey::load_kyber(&v).unwrap(); /// ``` - #[cfg(feature = "botan3")] - pub fn load_kyber512(key: &[u8]) -> Result { - let obj = botan_init!(botan_privkey_load_kyber512, key.as_ptr())?; - Ok(Privkey { obj }) - } - - /// Load a kyber 768 private key - /// - /// # Examples - /// /// ``` - /// let v = vec![0x42; 1184]; - /// let key = botan::Privkey::load_kyber768(&v).unwrap(); + /// let v = vec![0x42; 2400]; + /// let key768 = botan::Privkey::load_kyber(&v).unwrap(); + /// ``` + /// ``` + /// let v = vec![0x42; 3168]; + /// let key1024 = botan::Privkey::load_kyber(&v).unwrap(); /// ``` - #[cfg(feature = "botan3")] - pub fn load_kyber768(key: &[u8]) -> Result { - let obj = botan_init!(botan_privkey_load_kyber768, key.as_ptr())?; - Ok(Privkey { obj }) - } - - /// Load a kyber 1024 private key /// - /// # Examples + /// Loading a key with the wrong size will cause an error to be returned. /// - /// ``` - /// let v = vec![0x42; 1568]; - /// let key = botan::Privkey::load_kyber1024(&v).unwrap(); + /// ```should_panic + /// let v = vec![0x42; 1631]; + /// let key512 = botan::Privkey::load_kyber(&v).unwrap(); /// ``` #[cfg(feature = "botan3")] - pub fn load_kyber1024(key: &[u8]) -> Result { - let obj = botan_init!(botan_privkey_load_kyber1024, key.as_ptr())?; + pub fn load_kyber(key: &[u8]) -> Result { + let obj = botan_init!(botan_privkey_load_kyber, key.as_ptr(), key.len())?; Ok(Privkey { obj }) } @@ -497,52 +484,32 @@ impl Privkey { Ok(out) } - /// Get the Kyber512 private key + /// Get the Kyber private key /// /// # Examples /// /// ``` /// let v = vec![0xd6, 0xec, 0xcd, 0x63, 0x5a, 0x4f, 0x19, 0xd8, 0x02, 0x56, 0xbc, 0x9c, 0xa3, 0xc2, 0x3d, 0xeb, 0x78, 0x3e, 0x2e, 0x16, 0x93, 0x7e, 0xa1, 0x51, 0xe1, 0x36, 0x64, 0x8d, 0xb4, 0xcf, 0xa1, 0x73, 0xc6, 0x18, 0x55, 0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 0x8e, 0xd3, 0x22, 0x1f, 0x2b, 0x32, 0x20, 0x80, 0x5c, 0x8a, 0x28, 0x98, 0x33, 0x55, 0x20, 0x7d, 0xa3, 0x6f, 0xb7, 0x2f, 0x9b, 0xc8, 0x5c, 0x0a, 0x13, 0xb9, 0xd0, 0x41, 0x58, 0x6f, 0xd5, 0x83, 0xfe, 0xb1, 0x2a, 0xfd, 0x5a, 0x40, 0x2d, 0xd3, 0x3b, 0x43, 0x54, 0x3f, 0x5f, 0xa4, 0xeb, 0x43, 0x6c, 0x8d, 0x23, 0x49, 0x7b, 0x31, 0x27, 0x9a, 0x8b, 0x71, 0x5f, 0x91, 0x2f, 0x30, 0xa1, 0x81, 0x66, 0x62, 0x70, 0x91, 0x3b, 0xbd, 0x72, 0x59, 0x8e, 0xb9, 0xcd, 0x65, 0xa6, 0xda, 0x68, 0x0f, 0x5c, 0x6b, 0x3e, 0x2a, 0x2e, 0xa6, 0xc9, 0xc4, 0x76, 0xfc, 0x49, 0x37, 0xb0, 0x13, 0xc9, 0x93, 0xa7, 0x93, 0xd6, 0xc0, 0xab, 0x99, 0x60, 0x69, 0x5b, 0xa8, 0x38, 0xf6, 0x49, 0xda, 0x53, 0x9c, 0xa3, 0xd0]; - /// let key = botan::Privkey::load_kyber512(&v).unwrap(); - /// let v2 = key.get_kyber512_key().unwrap(); + /// let key = botan::Privkey::load_kyber(&v).unwrap(); + /// let v2 = key.get_kyber_key().unwrap(); /// assert_eq!(v, v2); /// ``` - pub fn get_kyber512_key(&self) -> Result> { - let mut out = vec![0; 1632]; - botan_call!(botan_privkey_kyber512_get_privkey, self.obj, out.as_mut_ptr())?; - Ok(out) - } - - /// Get the Kyber768 private key - /// - /// # Examples - /// /// ``` /// let v = vec![0x46, 0x23, 0x96, 0xf6, 0xb2, 0x1f, 0xf6, 0x25, 0xb9, 0x6b, 0x4b, 0x1f, 0x5c, 0x3a, 0x38, 0xb3, 0xc8, 0x07, 0x08, 0xf3, 0x3b, 0xcc, 0x17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 0xba, 0xbe, 0xf8, 0x11, 0x59, 0x86, 0xdc, 0x87, 0xf1, 0x72, 0x34, 0xba, 0xa3, 0x88, 0x5e, 0x33, 0xa1, 0x85, 0x68, 0x8b, 0x91, 0x58, 0x83, 0xec, 0x48, 0x09, 0xc5, 0xc9, 0x69, 0x1b, 0x95, 0xa0, 0x81, 0x79, 0xa4, 0x85, 0x77, 0xc1, 0x72, 0x4a, 0xa1, 0xbc, 0xf6, 0x64, 0xd5, 0xea, 0x49, 0xc6, 0x9a, 0x72, 0x7c, 0xda, 0x3e, 0x31, 0xe7, 0x1e, 0x67, 0x25, 0x7e, 0x65, 0xe8, 0x47, 0xdf, 0x59, 0x47, 0xab, 0xe2, 0x96, 0x75, 0x73, 0xac, 0x2d, 0x61, 0x59, 0xf9, 0x66, 0x99, 0xae, 0x16, 0xa5, 0x5f, 0x65, 0x4e, 0x8f, 0xe0, 0x0b, 0xea, 0x67, 0x91, 0x13, 0x5a, 0xa0, 0x45, 0xd8, 0x51, 0xd0, 0xd7, 0x3c, 0xd1, 0x59, 0xbe, 0x5c, 0x00, 0x04, 0x1b, 0x10, 0x33, 0xaf, 0x18, 0x50, 0x0c, 0xc6, 0x2b, 0x8d, 0xc6, 0x36, 0xbe, 0xd7, 0x0e, 0x4d, 0xd4, 0x98, 0x1e, 0x37, 0x88, 0x20, 0xeb, 0x73, 0xa7, 0xd3, 0xbc, 0x69, 0xa4, 0x2d, 0xcb, 0x91, 0x03, 0xec, 0x8b, 0xb8, 0x02, 0x07, 0x63, 0xba, 0x76, 0xb4, 0x82, 0x11, 0x80, 0x65, 0x29, 0x55, 0x3d, 0xa6, 0x48, 0x75, 0x39, 0x89, 0x47, 0x22, 0x44, 0x36, 0x72, 0xbc, 0x7e, 0xc3, 0x16, 0x46, 0x15, 0x8c, 0xa6, 0x63, 0x43, 0xe2, 0xe6, 0x9b, 0xd6, 0x38, 0xcc, 0x4a, 0x3c, 0x71, 0x1e, 0x37, 0x75, 0xce, 0x88, 0xb4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0x9b, 0xec, 0x54, 0x81, 0x2c, 0x2a, 0xff, 0xa0, 0x12, 0x97, 0x3b, 0x70, 0x0a, 0xd4, 0x8e, 0x27, 0x10, 0x78, 0x28, 0x08, 0x64, 0x26, 0x86, 0x00, 0xa7, 0xaa, 0x30, 0x9e, 0xaa, 0x10, 0x98, 0x75, 0x0a, 0x0f, 0x8a, 0x52, 0x2e, 0xb9, 0x29, 0x57, 0x7b, 0x41, 0x2f, 0x78, 0x55, 0x61, 0x36, 0x88, 0xb7, 0x2f, 0x9b, 0xc8, 0x5c, 0x0a, 0x13, 0xb9, 0xd0, 0x41, 0x58, 0x6f, 0xd5, 0x83, 0xfe, 0xb1, 0x2a, 0xfd, 0x5a, 0x40, 0x2d, 0xd3, 0x3b, 0x43, 0x54, 0x3f, 0x5f, 0xa4, 0xeb, 0x43, 0x6c, 0x8d, 0x75, 0x30, 0x0c, 0xab, 0x06, 0x66, 0xec, 0x12, 0x94, 0xf1, 0x4a, 0xeb, 0x07, 0x43, 0x4c, 0x98, 0x84, 0xba, 0x44, 0x00, 0x3e, 0xcd, 0xb4, 0x83, 0x91, 0x83, 0x82, 0x1a, 0x24, 0x85, 0xa7, 0xc6, 0x3e, 0x2a, 0x2e, 0xa6, 0xc9, 0xc4, 0x76, 0xfc, 0x49, 0x37, 0xb0, 0x13, 0xc9, 0x93, 0xa7, 0x93, 0xd6, 0xc0, 0xab, 0x99, 0x60, 0x69, 0x5b, 0xa8, 0x38, 0xf6, 0x49, 0xda, 0x53, 0x9c, 0xa3, 0xd0]; - /// let key = botan::Privkey::load_kyber768(&v).unwrap(); - /// let v2 = key.get_kyber768_key().unwrap(); + /// let key = botan::Privkey::load_kyber(&v).unwrap(); + /// let v2 = key.get_kyber_key().unwrap(); /// assert_eq!(v, v2); /// ``` - pub fn get_kyber768_key(&self) -> Result> { - let mut out = vec![0; 2400]; - botan_call!(botan_privkey_kyber768_get_privkey, self.obj, out.as_mut_ptr())?; - Ok(out) - } - - /// Get the Kyber1024 private key - /// - /// # Examples - /// /// ``` /// let v = vec![0x46, 0x23, 0x96, 0xf6, 0xb2, 0x1f, 0xf6, 0x25, 0xb9, 0x6b, 0x4b, 0x1f, 0x5c, 0x3a, 0x38, 0xb3, 0xc8, 0x07, 0x08, 0xf3, 0x3b, 0xcc, 0x17, 0x84, 0xbe, 0xdb, 0x48, 0xbe, 0xe0, 0x25, 0x3b, 0x42, 0x6c, 0xfb, 0x95, 0x61, 0x87, 0x12, 0xce, 0x98, 0x25, 0xa5, 0x3b, 0x5c, 0xc8, 0x7c, 0x81, 0x43, 0xaf, 0xc4, 0x6b, 0x40, 0x62, 0x7b, 0x4c, 0x4b, 0xbd, 0x2e, 0x38, 0x2c, 0xec, 0x45, 0x7e, 0x48, 0xa7, 0x13, 0x0c, 0x84, 0x12, 0xc2, 0x60, 0x5c, 0x47, 0x59, 0x15, 0xbf, 0x08, 0x47, 0x6d, 0xe4, 0xb8, 0xaa, 0x70, 0x29, 0x8a, 0xb9, 0x9d, 0xef, 0x93, 0x86, 0xc1, 0xf1, 0x12, 0x53, 0xc3, 0x98, 0xc6, 0xd0, 0xad, 0xf9, 0xd9, 0x7e, 0x22, 0x64, 0xa0, 0x26, 0xe4, 0x02, 0x11, 0xb5, 0x9a, 0x26, 0xa2, 0x3f, 0x16, 0x10, 0x2a, 0x22, 0x0a, 0x6f, 0x2b, 0xf2, 0x7a, 0x14, 0x01, 0x5f, 0x6f, 0x32, 0x61, 0xe2, 0x74, 0x75, 0x8c, 0xcc, 0xb7, 0x57, 0xa4, 0x06, 0x00, 0x53, 0x17, 0xa0, 0x50, 0xc2, 0x2d, 0x39, 0x9f, 0x99, 0x49, 0x74, 0xaa, 0x73, 0x13, 0xed, 0xfb, 0xba, 0x46, 0x08, 0x37, 0x16, 0x13, 0x98, 0x54, 0x81, 0xb0, 0xae, 0xc8, 0x9e, 0xdd, 0x60, 0x02, 0x75, 0x4b, 0x18, 0xe2, 0x75, 0xb9, 0x7a, 0xf8, 0xb4, 0xad,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, 0x5c, 0x66, 0x08, 0x2a, 0x30, 0x4d, 0xda, 0x86, 0xed, 0xb6, 0x06, 0xb6, 0x43, 0x73, 0xab, 0xb6, 0x68, 0x3b, 0x56, 0x94, 0x96, 0x61, 0xab, 0x60, 0xc0, 0x11, 0xe1, 0x4c, 0x2b, 0x23, 0xc8, 0x92, 0x35, 0x87, 0xa9, 0x74, 0xcc, 0x79, 0x57, 0x4c, 0x82, 0x95, 0x62, 0x10, 0x91, 0x80, 0x1d, 0x37, 0x23, 0x97, 0x57, 0x85, 0x58, 0x31, 0x69, 0xc3, 0x58, 0xd1, 0x82, 0x59, 0x6c, 0x34, 0x4b, 0x22, 0x96, 0x4a, 0x40, 0x95, 0x8b, 0x22, 0x72, 0xba, 0xfb, 0x0f, 0xfd, 0x2b, 0xcc, 0xe4, 0xb1, 0x4f, 0x02, 0x10, 0xcb, 0xc8, 0x14, 0x47, 0x6f, 0x40, 0x47, 0xf4, 0x80, 0x56, 0x83, 0x96, 0x74, 0x2b, 0x01, 0x23, 0x32, 0xa1, 0xa1, 0x19, 0x10, 0x56, 0xdf, 0xb9, 0xb4, 0x3a, 0x75, 0x7b, 0xa6, 0xac, 0x37, 0xbc, 0x66, 0x62, 0xe4, 0x33, 0xca, 0xf1, 0x59, 0x83, 0x95, 0xe6, 0x4f, 0xa9, 0xa7, 0x2f, 0x3b, 0x71, 0x00, 0x6a, 0xeb, 0x8e, 0xb3, 0x73, 0x76, 0xfd, 0xd6, 0x17, 0x4a, 0xe0, 0x60, 0x5a, 0x6b, 0x53, 0x2a, 0xb6, 0x14, 0xf0, 0x26, 0x41, 0xae, 0x56, 0x3b, 0xf2, 0x30, 0x19, 0x00, 0xf4, 0x01, 0xed, 0xd3, 0xb4, 0x31, 0xd3, 0x90, 0xa9, 0xea, 0x4a, 0x2b, 0x36, 0x9b, 0xcf, 0xf4, 0xb8, 0x38, 0xe8, 0x4a, 0x88, 0x79, 0x91, 0xa1, 0x67, 0xc8, 0x68, 0xcc, 0x9b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0x46, 0x99, 0x5a, 0x7c, 0x30, 0x3a, 0x3a, 0xae, 0x26, 0xa7, 0xaf, 0xbd, 0x99, 0x62, 0xed, 0x60, 0xa9, 0xdd, 0xe9, 0x5b, 0x4b, 0xf8, 0xac, 0x7a, 0x47, 0x49, 0x3c, 0xf6, 0x1e, 0xe3, 0xf2, 0x9b, 0xa0, 0x46, 0xce, 0x15, 0xa1, 0x76, 0x3f, 0x0c, 0x21, 0xfa, 0xba, 0x24, 0x67, 0x00, 0xad, 0x54, 0x09, 0xb0, 0xad, 0xdc, 0xcc, 0x97, 0x79, 0xa4, 0xd1, 0xfc, 0x45, 0xec, 0x26, 0x1f, 0x04, 0x8b, 0x9c, 0x9d, 0xaa, 0x38, 0xc9, 0xec, 0x22, 0x8b, 0x65, 0x05, 0xe8, 0x90, 0x52, 0x26, 0xb3, 0x84, 0x86, 0x80, 0x20, 0x59, 0xc2, 0xc5, 0xc8, 0x96, 0x01, 0x56, 0x06, 0x34, 0xcb, 0x13, 0x37, 0xb1, 0x31, 0x53, 0x65, 0x14, 0x48, 0x42, 0xbc, 0x40, 0x5a, 0x29, 0x2e, 0x68, 0x3c, 0xaf, 0xa4, 0x51, 0x45, 0x26, 0x94, 0x5c, 0x4d, 0xfb, 0x68, 0xee, 0x2a, 0xcd, 0xb8, 0xb7, 0x95, 0x32, 0x83, 0x66, 0x96, 0xd5, 0x31, 0x25, 0xa0, 0x45, 0xbd, 0xbb, 0x8a, 0x3b, 0xcc, 0x81, 0x23, 0x08, 0x3d, 0x1e, 0x68, 0x2c, 0x5b, 0xd7, 0x82, 0x0c, 0x76, 0xc4, 0x48, 0x35, 0x11, 0x51, 0x47, 0x4f, 0x69, 0xd6, 0x01, 0xd7, 0x70, 0x8d, 0xbb, 0x2c, 0x97, 0x9d, 0x77, 0x52, 0x74, 0x94, 0xb6, 0x85, 0x20, 0xa8, 0xff, 0x66, 0xc3, 0x41, 0x62, 0xca, 0x2a, 0xec, 0x80, 0x72, 0xa2, 0xa5,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5b, 0xa8, 0x38, 0xf6, 0x49, 0xda, 0x53, 0x9c, 0xa3, 0xd0]; - /// let key = botan::Privkey::load_kyber1024(&v).unwrap(); - /// let v2 = key.get_kyber1024_key().unwrap(); + /// let key = botan::Privkey::load_kyber(&v).unwrap(); + /// let v2 = key.get_kyber_key().unwrap(); /// assert_eq!(v, v2); /// ``` - pub fn get_kyber1024_key(&self) -> Result> { - let mut out = vec![0; 3168]; - botan_call!(botan_privkey_kyber1024_get_privkey, self.obj, out.as_mut_ptr())?; - Ok(out) + pub fn get_kyber_key(&self) -> Result> { + call_botan_ffi_viewing_vec_u8(&|ctx, cb| unsafe { + botan_privkey_view_kyber_raw_key(self.obj, ctx, cb) + }) } /// Sign a message using the specified padding method @@ -672,42 +639,31 @@ impl Pubkey { Ok(Pubkey { obj }) } - /// Load an Kyber512 key + /// Load an Kyber key /// /// # Examples /// /// ``` - /// let v = vec![0x42; 1632]; - /// let key = botan::Pubkey::load_kyber512(&v).unwrap(); + /// let v = vec![0x42; 800]; + /// let key = botan::Pubkey::load_kyber(&v).unwrap(); /// ``` - pub fn load_kyber512(key: &[u8]) -> Result { - let obj = botan_init!(botan_pubkey_load_kyber512, key.as_ptr())?; - Ok(Pubkey { obj }) - } - - /// Load an Kyber768 key - /// - /// # Examples - /// /// ``` - /// let v = vec![0x42; 2400]; - /// let key = botan::Pubkey::load_kyber768(&v).unwrap(); + /// let v = vec![0x42; 1184]; + /// let key = botan::Pubkey::load_kyber(&v).unwrap(); + /// ``` + /// ``` + /// let v = vec![0x42; 1568]; + /// let key = botan::Pubkey::load_kyber(&v).unwrap(); /// ``` - pub fn load_kyber768(key: &[u8]) -> Result { - let obj = botan_init!(botan_pubkey_load_kyber768, key.as_ptr())?; - Ok(Pubkey { obj }) - } - - /// Load an Kyber1024 key /// - /// # Examples + /// Loading a key with the wrong size will cause an error to be returned. /// + /// ```should_panic + /// let v = vec![0x42; 799]; + /// let key = botan::Pubkey::load_kyber(&v).unwrap(); /// ``` - /// let v = vec![0x42; 3168]; - /// let key = botan::Pubkey::load_kyber1024(&v).unwrap(); - /// ``` - pub fn load_kyber1024(key: &[u8]) -> Result { - let obj = botan_init!(botan_pubkey_load_kyber1024, key.as_ptr())?; + pub fn load_kyber(key: &[u8]) -> Result { + let obj = botan_init!(botan_pubkey_load_kyber, key.as_ptr(), key.len())?; Ok(Pubkey { obj }) } @@ -818,52 +774,32 @@ impl Pubkey { Ok(out) } - /// Get an Kyber512 key + /// Get an Kyber key /// /// # Examples /// /// ``` /// let v = vec![0x42; 800]; - /// let key = botan::Pubkey::load_kyber512(&v).unwrap(); - /// let v2 = key.get_kyber512_key().unwrap(); + /// let key = botan::Pubkey::load_kyber(&v).unwrap(); + /// let v2 = key.get_kyber_key().unwrap(); /// assert_eq!(v, v2); /// ``` - pub fn get_kyber512_key(&self) -> Result> { - let mut out = vec![0; 800]; - botan_call!(botan_pubkey_kyber512_get_pubkey, self.obj, out.as_mut_ptr())?; - Ok(out) - } - - /// Get an Kyber768 key - /// - /// # Examples - /// /// ``` /// let v = vec![0x42; 1184]; - /// let key = botan::Pubkey::load_kyber768(&v).unwrap(); - /// let v2 = key.get_kyber768_key().unwrap(); + /// let key = botan::Pubkey::load_kyber(&v).unwrap(); + /// let v2 = key.get_kyber_key().unwrap(); /// assert_eq!(v, v2); /// ``` - pub fn get_kyber768_key(&self) -> Result> { - let mut out = vec![0; 1184]; - botan_call!(botan_pubkey_kyber768_get_pubkey, self.obj, out.as_mut_ptr())?; - Ok(out) - } - - /// Get an Kyber1024 key - /// - /// # Examples - /// /// ``` /// let v = vec![0x42; 1568]; - /// let key = botan::Pubkey::load_kyber1024(&v).unwrap(); - /// let v2 = key.get_kyber1024_key().unwrap(); + /// let key = botan::Pubkey::load_kyber(&v).unwrap(); + /// let v2 = key.get_kyber_key().unwrap(); /// assert_eq!(v, v2); /// ``` - pub fn get_kyber1024_key(&self) -> Result> { - let mut out = vec![0; 1568]; - botan_call!(botan_pubkey_kyber1024_get_pubkey, self.obj, out.as_mut_ptr())?; - Ok(out) + pub fn get_kyber_key(&self) -> Result> { + call_botan_ffi_viewing_vec_u8(&|ctx, cb| unsafe { + botan_pubkey_view_kyber_raw_key(self.obj, ctx, cb) + }) } /// Encrypt a message using the specified padding method From 125e38c8aadf6dc606e8c0ed377058e05c3a52e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kj=C3=A4ll?= Date: Sat, 27 May 2023 16:37:31 +0200 Subject: [PATCH 3/3] move kyber functions into the botan3 feature --- botan-sys/src/pubkey.rs | 29 ++++++++++++++++++++++++----- botan/src/pubkey.rs | 5 ++++- 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/botan-sys/src/pubkey.rs b/botan-sys/src/pubkey.rs index edc042a..ac1359a 100644 --- a/botan-sys/src/pubkey.rs +++ b/botan-sys/src/pubkey.rs @@ -211,11 +211,6 @@ extern "C" { pub fn botan_privkey_x25519_get_privkey(key: botan_privkey_t, output: *mut u8) -> c_int; pub fn botan_pubkey_x25519_get_pubkey(key: botan_pubkey_t, pubkey: *mut u8) -> c_int; - pub fn botan_privkey_load_kyber(key: *mut botan_privkey_t, privkey: *const u8, key_len: usize) -> c_int; - pub fn botan_pubkey_load_kyber(key: *mut botan_pubkey_t, privkey: *const u8, key_len: usize) -> c_int; - pub fn botan_privkey_view_kyber_raw_key(key: botan_privkey_t, ctx: botan_view_ctx, view: botan_view_bin_fn) -> c_int; - pub fn botan_pubkey_view_kyber_raw_key(key: botan_pubkey_t, ctx: botan_view_ctx, view: botan_view_bin_fn) -> c_int; - pub fn botan_privkey_load_ecdsa( key: *mut botan_privkey_t, scalar: botan_mp_t, @@ -322,4 +317,28 @@ extern "C" { view_ctx: botan_view_ctx, view_fn: botan_view_str_fn, ) -> c_int; + + pub fn botan_privkey_load_kyber( + key: *mut botan_privkey_t, + privkey: *const u8, + key_len: usize + ) -> c_int; + + pub fn botan_pubkey_load_kyber( + key: *mut botan_pubkey_t, + privkey: *const u8, + key_len: usize + ) -> c_int; + + pub fn botan_privkey_view_kyber_raw_key( + key: botan_privkey_t, + ctx: botan_view_ctx, view: + botan_view_bin_fn + ) -> c_int; + + pub fn botan_pubkey_view_kyber_raw_key( + key: botan_pubkey_t, + ctx: botan_view_ctx, + view: botan_view_bin_fn + ) -> c_int; } diff --git a/botan/src/pubkey.rs b/botan/src/pubkey.rs index e2fc479..9cf7ae4 100644 --- a/botan/src/pubkey.rs +++ b/botan/src/pubkey.rs @@ -109,6 +109,7 @@ impl Privkey { Ok(Privkey { obj }) } + #[cfg(feature = "botan3")] /// Load a kyber private key /// /// # Examples @@ -132,7 +133,6 @@ impl Privkey { /// let v = vec![0x42; 1631]; /// let key512 = botan::Privkey::load_kyber(&v).unwrap(); /// ``` - #[cfg(feature = "botan3")] pub fn load_kyber(key: &[u8]) -> Result { let obj = botan_init!(botan_privkey_load_kyber, key.as_ptr(), key.len())?; Ok(Privkey { obj }) @@ -484,6 +484,7 @@ impl Privkey { Ok(out) } + #[cfg(feature = "botan3")] /// Get the Kyber private key /// /// # Examples @@ -639,6 +640,7 @@ impl Pubkey { Ok(Pubkey { obj }) } + #[cfg(feature = "botan3")] /// Load an Kyber key /// /// # Examples @@ -774,6 +776,7 @@ impl Pubkey { Ok(out) } + #[cfg(feature = "botan3")] /// Get an Kyber key /// /// # Examples