rust-tuf
rust-tuf copied to clipboard
RSA and ECDSA keys should be encoded as a PEM string
According to the spec section 4.2, "rsa" and "ecdsa" keys, as defined by:
{ "keytype" : "rsa",
"scheme" : "rsassa-pss-sha256",
"keyval" : {"public" : PUBLIC}
}
{ "keytype" : "ecdsa-sha2-nistp256",
"scheme" : "ecdsa-sha2-nistp256",
"keyval" : {"public" : PUBLIC}
}
The public portion of the key should be encoded as a PEM string, not base64(spki(key)).