CK_ATTRIBUTE get_biginteger mixes up endianness
Cryptoki base spec defines "Big integer (...) a string of CK_BYTEs representing an unsigned integer of arbitrary size, most-significant byte first (e.g., the integer 32768 is represented as the 2-byte string 0x80 0x00)".
Meanwhile, this library parses as little endian: https://github.com/mheese/rust-pkcs11/blob/1323d5f4cc4774235ef327d0f819804e2b6f2894/src/types.rs#L853-L858
Yeah I just hit this too... was super confused that the lib assumes LE... which is totally not what all my other sources say including the spec.
It's just a typo, ASN1 is definitely BE.
yeah, good find guys! 👍
Please switch to the cryptoki crate: https://github.com/parallaxsecond/rust-cryptoki