Skip to content

Incorrect sizes for secp224k1 keys through the PSA API #336

@gilles-peskine-arm

Description

@gilles-peskine-arm

Description

The PSA crypto code assumes that a Weierstrass elliptic curve has a “bit size”, that a private key on that curve is that many bits, and a public key is a pair of numbers (coordinates) of that many bits. This is true for most curves, but breaks down for one of the curves that we support: secp224k1, which has 224-bit coordinates (since the order of the field is a 224-bit number) but 225-bit private keys (since the order of the base point is a 225-bit number).

The PSA Crypto specification makes the same incorrect assumption when it describes key formats (documentation of psa_export_key and psa_export_public_key). Private link: https://github.com/ARMmbed/psa-crypto/issues/352

Issue request type

[ ] Question
[ ] Enhancement
[x] Bug

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions