diff --git a/src/lib.rs b/src/lib.rs index 7896207..5cc5dd4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -74,7 +74,7 @@ where let application_property_template = piv_types::ApplicationPropertyTemplate::default() .with_application_label(APPLICATION_LABEL) .with_application_url(APPLICATION_URL) - .with_supported_cryptographic_algorithms(&[Tdes, Aes256, P256, Ed255, X255]); + .with_supported_cryptographic_algorithms(&[Tdes, Aes256, P256, Ed25519, X25519]); application_property_template .encode_to_heapless_vec(reply) diff --git a/src/piv_types.rs b/src/piv_types.rs index 04e9de5..9ef4506 100644 --- a/src/piv_types.rs +++ b/src/piv_types.rs @@ -60,8 +60,8 @@ impl TryFrom<&[u8]> for Puk { // references Opacity ZKM. pub enum Algorithms { Tdes = 0x3, - Rsa1k = 0x6, - Rsa2k = 0x7, + Rsa1024 = 0x6, + Rsa2048 = 0x7, Aes128 = 0x8, Aes192 = 0xA, Aes256 = 0xC, @@ -74,10 +74,10 @@ pub enum Algorithms { // https://globalplatform.org/wp-content/uploads/2014/03/GPC_ISO_Framework_v1.0.pdf#page=15 P521 = 0x15, // non-standard! - Rsa3k = 0xE0, - Rsa4k = 0xE1, - Ed255 = 0xE2, - X255 = 0xE3, + Rsa3072 = 0xE0, + Rsa4096 = 0xE1, + Ed25519 = 0xE2, + X25519 = 0xE3, Ed448 = 0xE4, X448 = 0xE5, diff --git a/src/state.rs b/src/state.rs index 9c16c63..bba3932 100644 --- a/src/state.rs +++ b/src/state.rs @@ -13,9 +13,9 @@ use crate::{Pin, Puk}; pub type Result = core::result::Result; pub enum Key { - Ed255(KeyId), + Ed25519(KeyId), P256(KeyId), - X255(KeyId), + X25519(KeyId), } pub enum PinPolicy { Never,