Class CeresPrivateKey

  • All Implemented Interfaces:
    java.io.Serializable, java.security.interfaces.RSAKey, java.security.interfaces.RSAPrivateKey, java.security.Key, java.security.PrivateKey, javax.security.auth.Destroyable

    public final class CeresPrivateKey
    extends java.lang.Object
    implements java.security.interfaces.RSAPrivateKey
    Clave privada de una tarjeta FNMT-RCM-CERES. La clase no contiene la clave privada en sí, sino una referencia a ella y una referencia a la propia tarjeta.
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getAlgorithm()  
      (package private) CryptoCard getCryptoCard()
      Obtiene la tarjeta capaz de operar con esta clave.
      byte[] getEncoded()  
      java.lang.String getFormat()  
      java.math.BigInteger getModulus()
      Método no soportado.
      java.math.BigInteger getPrivateExponent()
      Método no soportado.
      (package private) CeresPrivateKeyReference getReference()
      Recupera la referencia de la clave.
      java.lang.String toString()  
      private void writeObject​(java.io.ObjectOutputStream outStream)
      Serialización no soportada, lanza un NotSerializableException.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javax.security.auth.Destroyable

        destroy, isDestroyed
      • Methods inherited from interface java.security.interfaces.RSAKey

        getParams
    • Field Detail

      • ceres

        private final Ceres ceres
        Instancia de la tarjeta donde reside la clave.
      • modulus

        private final java.math.BigInteger modulus
        Módulo de la clave privada. Al ser la clave privada interna a la tarjeta, este dato se obtiene de la pública (es igual).
    • Constructor Detail

      • CeresPrivateKey

        CeresPrivateKey​(CeresPrivateKeyReference keyReference,
                        Ceres card,
                        java.math.BigInteger mod)
        Crea una clave privada de tarjeta FNMT-RCM-CERES.
        Parameters:
        keyReference - Referencia a la clave privada de tarjeta FNMT-RCM-CERES.
        card - Tarjeta a la cual pertenece esta clave.
        mod - Módulo de la clave privada.
    • Method Detail

      • getAlgorithm

        public java.lang.String getAlgorithm()
        Specified by:
        getAlgorithm in interface java.security.Key
      • getCryptoCard

        CryptoCard getCryptoCard()
        Obtiene la tarjeta capaz de operar con esta clave.
        Returns:
        Tarjeta capaz de operar con esta clave.
      • getEncoded

        public byte[] getEncoded()
        Specified by:
        getEncoded in interface java.security.Key
      • getFormat

        public java.lang.String getFormat()
        Specified by:
        getFormat in interface java.security.Key
      • getReference

        CeresPrivateKeyReference getReference()
        Recupera la referencia de la clave.
        Returns:
        Referencia de la clave.
      • getModulus

        public java.math.BigInteger getModulus()
        Método no soportado.
        Specified by:
        getModulus in interface java.security.interfaces.RSAKey
      • getPrivateExponent

        public java.math.BigInteger getPrivateExponent()
        Método no soportado.
        Specified by:
        getPrivateExponent in interface java.security.interfaces.RSAPrivateKey
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • writeObject

        private void writeObject​(java.io.ObjectOutputStream outStream)
                          throws java.io.IOException
        Serialización no soportada, lanza un NotSerializableException.
        Parameters:
        outStream - No se usa.
        Throws:
        java.io.IOException - No se lanza, siempre lanza un NotSerializableException.