Class EcdsaSignKeyManager


  • public final class EcdsaSignKeyManager
    extends java.lang.Object
    This key manager generates new EcdsaPrivateKey keys and produces new instances of EcdsaSignJce.
    • Method Detail

      • registerPair

        public static void registerPair​(boolean newKeyAllowed)
                                 throws java.security.GeneralSecurityException
        Registers the EcdsaSignKeyManager and the EcdsaVerifyKeyManager with the registry, so that the the Ecdsa-Keys can be used with Tink.
        Throws:
        java.security.GeneralSecurityException
      • ecdsaP256Template

        public static final KeyTemplate ecdsaP256Template()
        Returns:
        A KeyTemplate that generates new instances of ECDSA keys with the following parameters:
      • rawEcdsaP256Template

        public static final KeyTemplate rawEcdsaP256Template()
        Returns:
        A KeyTemplate that generates new instances of ECDSA keys with the following parameters:
        • Hash function: SHA256
        • Curve: NIST P-256
        • Signature encoding: IEEE_P1363 (this is the encoding that JWS and WebCrypto use).
        • Prefix type: RAW (no prefix).
        Keys generated from this template create raw signatures of exactly 64 bytes. It is compatible with JWS and most other libraries.