Add comment pointing to Gnuk source for decryption return format.

This commit is contained in:
Heiko Schaefer 2021-07-22 16:50:51 +02:00
parent ee6b45477e
commit 9d93570d9f

View file

@ -118,6 +118,7 @@ impl<'a> crypto::Decryptor for CardDecryptor<'a> {
// (Gnuk returns a leading '0x04' byte and // (Gnuk returns a leading '0x04' byte and
// an additional 32 trailing bytes) // an additional 32 trailing bytes)
if curve == &Curve::NistP256 && dec.len() == 65 { if curve == &Curve::NistP256 && dec.len() == 65 {
// see Gnuk src/call-ec.c:82
dec = dec[1..33].to_vec(); dec = dec[1..33].to_vec();
} }