Public Key plain byte encoding (#540)

* public key is encoded in bytes

* ECDSA pubkey in uncompressed format
This commit is contained in:
kaczmarczyck
2022-08-31 15:51:40 +02:00
committed by GitHub
parent 598c21071e
commit 1b360662ee
6 changed files with 18 additions and 50 deletions

View File

@@ -836,8 +836,8 @@ impl From<ecdh::PubKey> for CoseKey {
impl From<ecdsa::PubKey> for CoseKey {
fn from(pk: ecdsa::PubKey) -> Self {
let mut x_bytes = [0; ecdh::NBYTES];
let mut y_bytes = [0; ecdh::NBYTES];
let mut x_bytes = [0; ecdsa::NBYTES];
let mut y_bytes = [0; ecdsa::NBYTES];
pk.to_coordinates(&mut x_bytes, &mut y_bytes);
CoseKey {
x_bytes,