You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
P256k1 as used in P256k1PrivKey, P256k1PubKey, etc. is a little unwieldy. And it is already inconsistent -- some instances are P256k1 and others are P256K1 (with a capital K)
Java Crypto and Bouncy Castle both use EC for Elliptic Curve. We are using the P256k1 subset of EC, so some possible two-letter prefixes are:
PK -- P256K1
SP -- SecP
SJ -- Secp256k1-Jdk
I do think the prefix is needed because we already have collisions between the Java Crypto ECPoint and the Bouncy Castle ECPoint, etc. And our types will need to co-exist in the same source files.
I'm looking for feedback. Should we shorten to two-letters? If so, which two letters? I'm open to a three letter combination, too. Maybe SPK?
Of the options, I would probably do SJ - seems the most defendable choice.
msgilligan
changed the title
Shorten variable prefix for P256K1 types form P256k1 to two letters
Shorten variable prefix for P256K1 types from P256k1 to two letters
Apr 15, 2025
P256k1
as used inP256k1PrivKey
,P256k1PubKey
, etc. is a little unwieldy. And it is already inconsistent -- some instances areP256k1
and others areP256K1
(with a capitalK
)Java Crypto and Bouncy Castle both use
EC
for Elliptic Curve. We are using the P256k1 subset ofEC
, so some possible two-letter prefixes are:PK
-- P256K1SP
-- SecPSJ
-- Secp256k1-JdkI do think the prefix is needed because we already have collisions between the Java Crypto
ECPoint
and the Bouncy CastleECPoint
, etc. And our types will need to co-exist in the same source files.I'm looking for feedback. Should we shorten to two-letters? If so, which two letters? I'm open to a three letter combination, too. Maybe
SPK
?@schildbach @craigraw ?
The text was updated successfully, but these errors were encountered: