Package org.kapott.cryptalgs
Class ISO9796p1
java.lang.Object
java.security.SignatureSpi
org.kapott.cryptalgs.ISO9796p1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate MessageDigestprivate SignatureParamSpecprivate PrivateKeyprivate RSAPublicKeyFields inherited from class java.security.SignatureSpi
appRandom -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectengineGetParameter(String parameter) Deprecated.protected voidengineInitSign(PrivateKey privateKey) protected voidengineInitVerify(PublicKey publicKey) protected voidengineSetParameter(String param1, Object value) Deprecated.protected voidprotected byte[]protected intengineSign(byte[] output, int offset, int len) protected voidengineUpdate(byte b) protected voidengineUpdate(byte[] b, int offset, int length) protected booleanengineVerify(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 Loggerprivate 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 bytePerm(int b) private static bytePerm1(int b) static byte[]prepareForSig(byte[] buffer, BigInteger bModulus) private static byteS(int x) Methods inherited from class java.security.SignatureSpi
clone, engineGetParameters, engineInitSign, engineUpdate, engineVerify
-
Field Details
-
pubKey
-
privKey
-
dig
-
param
-
-
Constructor Details
-
ISO9796p1
public ISO9796p1()
-
-
Method Details
-
getLogger
-
engineGetParameter
Deprecated.- Specified by:
engineGetParameterin classSignatureSpi
-
engineInitSign
- Specified by:
engineInitSignin classSignatureSpi
-
engineInitVerify
- Specified by:
engineInitVerifyin classSignatureSpi
-
engineSetParameter
Deprecated.- Specified by:
engineSetParameterin classSignatureSpi
-
engineSetParameter
protected void engineSetParameter(AlgorithmParameterSpec param1) throws InvalidAlgorithmParameterException - Overrides:
engineSetParameterin classSignatureSpi- Throws:
InvalidAlgorithmParameterException
-
engineSign
- Specified by:
engineSignin classSignatureSpi- Throws:
SignatureException
-
prepareForSig
- Throws:
SignatureException
-
engineSign
- Overrides:
engineSignin classSignatureSpi- Throws:
SignatureException
-
engineUpdate
protected void engineUpdate(byte b) - Specified by:
engineUpdatein classSignatureSpi
-
engineUpdate
protected void engineUpdate(byte[] b, int offset, int length) - Specified by:
engineUpdatein classSignatureSpi
-
engineVerify
- Specified by:
engineVerifyin classSignatureSpi- Throws:
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 SignatureException - Throws:
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
- Throws:
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)
-