Class P256Keys

java.lang.Object
com.iizix.server.push.engine.transport.P256Keys

public final class P256Keys extends Object
The P-256 key material of Web Push, loaded, generated and encoded with java.base only: the raw forms the wire carries - the 65-byte uncompressed point 0x04 || X || Y of a public key and the 32-byte scalar of a private key, both base64url without padding - to and from the JDK's own ECPublicKey and ECPrivateKey.

No provider is named, deliberately. The former loaders in com.iizix.push.vapid.Utils hand BouncyCastle key specs to a KeyFactory obtained from the "BC" provider by name. Under Equinox the spec class from the com.iizix.core bundle and the provider's own copy come from different class loaders, and the factory answers "key spec not recognized" - measured in the Designer on 2026-09-08 with a key pair that is correct. The Designer's debug server is where the Push Notification acceptance test runs, so the transports cannot depend on that path. java.security.interfaces and java.security.spec live in java.base, one loader for the whole VM, and SunEC supplies EC key generation, ECDSA and ECDH there. This is the same reasoning VAPIDKeys.generateKeys() records for the generator.

Thread-safe: no state.

Author:
Christopher Mindus