Use full names for cryptosystems

This commit is contained in:
Sosthène Guédon
2022-10-31 11:27:07 +01:00
parent 0dc602cd81
commit d1fac724ea
3 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -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)
+6 -6
View File
@@ -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,
+2 -2
View File
@@ -13,9 +13,9 @@ use crate::{Pin, Puk};
pub type Result<T> = core::result::Result<T, ()>;
pub enum Key {
Ed255(KeyId),
Ed25519(KeyId),
P256(KeyId),
X255(KeyId),
X25519(KeyId),
}
pub enum PinPolicy {
Never,