@@ -44,23 +44,21 @@ cfg_if::cfg_if! {
4444}
4545pub const MAX_SHORT_DATA_LENGTH : usize = 128 ;
4646
47- // TODO:alt3r-3go: Do we want better keylength granularity here?
48- #[ cfg( any( feature = "rsa2k-pkcs" , feature = "rsa3k" , feature = "rsa4k" ) ) ]
47+ #[ cfg( any( feature = "rsa2k" , feature = "rsa3k" , feature = "rsa4k" ) ) ]
4948pub const MAX_SIGNATURE_LENGTH : usize = 512 ;
50- #[ cfg( any( feature = "rsa2k-pkcs " , feature = "rsa3k" , feature = "rsa4k" ) ) ]
51- // TODO:alt3r-3go: We use PKCS#8 DER format, this value was found empirically for 2K keys. Need to generalize.
49+ #[ cfg( any( feature = "rsa2k" , feature = "rsa3k" , feature = "rsa4k" ) ) ]
50+ // TODO: We use PKCS#8 DER format, this value was found empirically for 2K keys. Need to generalize.
5251pub const MAX_KEY_MATERIAL_LENGTH : usize = 1217 ;
53- #[ cfg( any( feature = "rsa2k-pkcs" , feature = "rsa3k" , feature = "rsa4k" ) ) ]
54- // TODO:alt3r-3go: This is due to the fact that KEY_MATERIAL_LENGTH is now bigger than MESSAGE_LENGTH.
55- // Double-check this is okay.
52+ #[ cfg( any( feature = "rsa2k" , feature = "rsa3k" , feature = "rsa4k" ) ) ]
53+ // This is due to the fact that KEY_MATERIAL_LENGTH is bigger than MESSAGE_LENGTH for RSA.
5654pub const MAX_MESSAGE_LENGTH : usize = MAX_KEY_MATERIAL_LENGTH ;
5755
5856
59- #[ cfg( not( any( feature = "rsa2k-pkcs " , feature = "rsa3k" , feature = "rsa4k" ) ) ) ]
57+ #[ cfg( not( any( feature = "rsa2k" , feature = "rsa3k" , feature = "rsa4k" ) ) ) ]
6058pub const MAX_SIGNATURE_LENGTH : usize = 72 ;
61- #[ cfg( not( any( feature = "rsa2k-pkcs " , feature = "rsa3k" , feature = "rsa4k" ) ) ) ]
59+ #[ cfg( not( any( feature = "rsa2k" , feature = "rsa3k" , feature = "rsa4k" ) ) ) ]
6260pub const MAX_KEY_MATERIAL_LENGTH : usize = 128 ;
63- #[ cfg( not( any( feature = "rsa2k-pkcs " , feature = "rsa3k" , feature = "rsa4k" ) ) ) ]
61+ #[ cfg( not( any( feature = "rsa2k" , feature = "rsa3k" , feature = "rsa4k" ) ) ) ]
6462pub const MAX_MESSAGE_LENGTH : usize = 1024 ;
6563
6664// must be MAX_KEY_MATERIAL_LENGTH + 4
0 commit comments