ibm.security.internal.spec

Class EdECPrivateKeySpec

  • java.lang.Object
    • ibm.security.internal.spec.EdECPrivateKeySpec
  • All Implemented Interfaces:
    java.security.spec.KeySpec


    public final class EdECPrivateKeySpec
    extends java.lang.Object
    implements java.security.spec.KeySpec
    A class representing elliptic curve private keys as defined in RFC 8032: Edwards-Curve Digital Signature Algorithm (EdDSA), including the curve and other algorithm parameters. The private key is a bit string represented using a byte array. This class only supports bit string lengths that are a multiple of 8.
    • Constructor Summary

      Constructors 
      Constructor and Description
      EdECPrivateKeySpec(NamedParameterSpec params, byte[] bytes)
      Construct a private key spec using the supplied parameters and bit string.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      byte[] getBytes()
      Get the byte array representing the private key.
      NamedParameterSpec getParams()
      Get the algorithm parameters that define the curve and other settings.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EdECPrivateKeySpec

        public EdECPrivateKeySpec(NamedParameterSpec params,
                                  byte[] bytes)
        Construct a private key spec using the supplied parameters and bit string.
        Parameters:
        params - The algorithm parameters.
        bytes - The key as a byte array. This array is copied to protect against subsequent modification.
        Throws:
        java.lang.NullPointerException - if params or bytes is null.
    • Method Detail

      • getParams

        public NamedParameterSpec getParams()
        Get the algorithm parameters that define the curve and other settings.
        Returns:
        The algorithm parameters.
      • getBytes

        public byte[] getBytes()
        Get the byte array representing the private key. A new copy of the array is returned each time this method is called.
        Returns:
        The private key as a byte array.

© Portions Copyright 2003, 2023 IBM Corporation. All rights reserved.
© Portions Copyright 2003, 2023 Oracle and/or its affiliates. All rights reserved.