mirror of
https://github.com/apple/swift-crypto
synced 2026-11-24 04:37:48 +00:00
### Motivation: An EC point has a compact representation if a condition holds based on the field prime, but `_isCompactReprestable` mistakenly uses the group order, which is not the same. This is an issue in our BoringSSL backend only. ### Modifications: - Subtract `y` from the field prime rather than `group.order` in `_isCompactRepresentable`. - Add tests. ### Result: `compactRepresentation` now aligns with `init(compactRepresentation:)`, the draft, and CryptoKit for all curve points.