Class ISO9796p1


  • public class ISO9796p1
    extends java.security.SignatureSpi
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.security.MessageDigest dig  
      private SignatureParamSpec param  
      private java.security.PrivateKey privKey  
      private java.security.interfaces.RSAPublicKey pubKey  
      • Fields inherited from class java.security.SignatureSpi

        appRandom
    • Constructor Summary

      Constructors 
      Constructor Description
      ISO9796p1()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected java.lang.Object engineGetParameter​(java.lang.String parameter)
      Deprecated.
      protected void engineInitSign​(java.security.PrivateKey privateKey)  
      protected void engineInitVerify​(java.security.PublicKey publicKey)  
      protected void engineSetParameter​(java.lang.String param1, java.lang.Object value)
      Deprecated.
      protected void engineSetParameter​(java.security.spec.AlgorithmParameterSpec param1)  
      protected byte[] engineSign()  
      protected int engineSign​(byte[] output, int offset, int len)  
      protected void engineUpdate​(byte b)  
      protected void engineUpdate​(byte[] b, int offset, int length)  
      protected boolean engineVerify​(byte[] sig)  
      private static byte[] getIRfromIS​(byte[] is, byte[] exp, byte[] mod, int[] ks)  
      private static byte[] getIRfromMR​(byte[] mr, int k)  
      private static byte[] getISfromSig​(byte[] sig, byte[] exp, byte[] mod)  
      protected java.util.logging.Logger getLogger()  
      private static byte[] getMEfromMP​(byte[] mp, int t)  
      private static byte[] getMPfromMR​(byte[] mr, int t, int[] zs, int[] rs)  
      private static byte[] getMRfromIR​(byte[] ir, int k, int[] ts)  
      private static byte[] getMRfromME​(byte[] me, int t, int z, int r)  
      private static byte[] getSigFromIS​(byte[] is, byte[] modulus)  
      private static byte Perm​(int b)  
      private static byte Perm1​(int b)  
      static byte[] prepareForSig​(byte[] buffer, java.math.BigInteger bModulus)  
      private static byte S​(int x)  
      • Methods inherited from class java.security.SignatureSpi

        clone, engineGetParameters, engineInitSign, engineUpdate, engineVerify
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • pubKey

        private java.security.interfaces.RSAPublicKey pubKey
      • privKey

        private java.security.PrivateKey privKey
      • dig

        private java.security.MessageDigest dig
    • Constructor Detail

      • ISO9796p1

        public ISO9796p1()
    • Method Detail

      • getLogger

        protected java.util.logging.Logger getLogger()
      • engineGetParameter

        @Deprecated
        protected java.lang.Object engineGetParameter​(java.lang.String parameter)
        Deprecated.
        Specified by:
        engineGetParameter in class java.security.SignatureSpi
      • engineInitSign

        protected void engineInitSign​(java.security.PrivateKey privateKey)
        Specified by:
        engineInitSign in class java.security.SignatureSpi
      • engineInitVerify

        protected void engineInitVerify​(java.security.PublicKey publicKey)
        Specified by:
        engineInitVerify in class java.security.SignatureSpi
      • engineSetParameter

        @Deprecated
        protected void engineSetParameter​(java.lang.String param1,
                                          java.lang.Object value)
        Deprecated.
        Specified by:
        engineSetParameter in class java.security.SignatureSpi
      • engineSetParameter

        protected void engineSetParameter​(java.security.spec.AlgorithmParameterSpec param1)
                                   throws java.security.InvalidAlgorithmParameterException
        Overrides:
        engineSetParameter in class java.security.SignatureSpi
        Throws:
        java.security.InvalidAlgorithmParameterException
      • engineSign

        protected byte[] engineSign()
                             throws java.security.SignatureException
        Specified by:
        engineSign in class java.security.SignatureSpi
        Throws:
        java.security.SignatureException
      • prepareForSig

        public static byte[] prepareForSig​(byte[] buffer,
                                           java.math.BigInteger bModulus)
                                    throws java.security.SignatureException
        Throws:
        java.security.SignatureException
      • engineSign

        protected int engineSign​(byte[] output,
                                 int offset,
                                 int len)
                          throws java.security.SignatureException
        Overrides:
        engineSign in class java.security.SignatureSpi
        Throws:
        java.security.SignatureException
      • engineUpdate

        protected void engineUpdate​(byte b)
        Specified by:
        engineUpdate in class java.security.SignatureSpi
      • engineUpdate

        protected void engineUpdate​(byte[] b,
                                    int offset,
                                    int length)
        Specified by:
        engineUpdate in class java.security.SignatureSpi
      • engineVerify

        protected boolean engineVerify​(byte[] sig)
                                throws java.security.SignatureException
        Specified by:
        engineVerify in class java.security.SignatureSpi
        Throws:
        java.security.SignatureException
      • getISfromSig

        private static byte[] getISfromSig​(byte[] sig,
                                           byte[] exp,
                                           byte[] mod)
      • getIRfromIS

        private static byte[] getIRfromIS​(byte[] is,
                                          byte[] exp,
                                          byte[] mod,
                                          int[] ks)
                                   throws java.security.SignatureException
        Throws:
        java.security.SignatureException
      • Perm

        private static byte Perm​(int b)
      • Perm1

        private static byte Perm1​(int b)
      • getMRfromIR

        private static byte[] getMRfromIR​(byte[] ir,
                                          int k,
                                          int[] ts)
      • S

        private static byte S​(int x)
      • getMPfromMR

        private static byte[] getMPfromMR​(byte[] mr,
                                          int t,
                                          int[] zs,
                                          int[] rs)
                                   throws java.security.SignatureException
        Throws:
        java.security.SignatureException
      • getMEfromMP

        private static byte[] getMEfromMP​(byte[] mp,
                                          int t)
      • getMRfromME

        private static byte[] getMRfromME​(byte[] me,
                                          int t,
                                          int z,
                                          int r)
      • getIRfromMR

        private static byte[] getIRfromMR​(byte[] mr,
                                          int k)
      • getSigFromIS

        private static byte[] getSigFromIS​(byte[] is,
                                           byte[] modulus)