Package org.kapott.cryptalgs
Class PKCS1_PSS
java.lang.Object
java.security.SignatureSpi
org.kapott.cryptalgs.PKCS1_PSS
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate SignatureParamSpecprivate ByteArrayOutputStreamprivate PrivateKeyprivate RSAPublicKeyFields inherited from class java.security.SignatureSpi
appRandom -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcalculateEMBitLen(BigInteger modulus) private static byte[]concat(byte[] x1, byte[] x2) static byte[]emsa_pss_encode(SignatureParamSpec spec, byte[] msg, int emBits) static booleanemsa_pss_verify(SignatureParamSpec spec, byte[] msg, byte[] EM, int emBits) protected 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) static MessageDigestprivate static byte[]hash(SignatureParamSpec spec, byte[] data) private static byte[]i2os(BigInteger x, int outLen) private static byte[]mgf1(SignatureParamSpec spec, byte[] mgfSeed, int maskLen) private static BigIntegeros2i(byte[] bytes) private byte[]pss_sign(PrivateKey key, byte[] msg) private booleanpss_verify(RSAPublicKey key, byte[] msg, byte[] S) private static byte[]random_os(int len) private static BigIntegersp1(PrivateKey key, BigInteger m) private static BigIntegervp1(RSAPublicKey key, BigInteger s) private static byte[]xor_os(byte[] a1, byte[] a2) Methods inherited from class java.security.SignatureSpi
clone, engineGetParameters, engineInitSign, engineUpdate, engineVerify
-
Field Details
-
pubKey
-
privKey
-
param
-
plainmsg
-
-
Constructor Details
-
PKCS1_PSS
public PKCS1_PSS()
-
-
Method Details
-
engineSetParameter
Deprecated.- Specified by:
engineSetParameterin classSignatureSpi
-
engineSetParameter
protected void engineSetParameter(AlgorithmParameterSpec param1) throws InvalidAlgorithmParameterException - Overrides:
engineSetParameterin classSignatureSpi- Throws:
InvalidAlgorithmParameterException
-
engineGetParameter
Deprecated.- Specified by:
engineGetParameterin classSignatureSpi
-
getMessageDigest
-
engineInitSign
- Specified by:
engineInitSignin classSignatureSpi
-
engineInitVerify
- Specified by:
engineInitVerifyin classSignatureSpi
-
engineUpdate
protected void engineUpdate(byte b) - Specified by:
engineUpdatein classSignatureSpi
-
engineUpdate
protected void engineUpdate(byte[] b, int offset, int length) - Specified by:
engineUpdatein classSignatureSpi
-
engineSign
- Overrides:
engineSignin classSignatureSpi- Throws:
SignatureException
-
engineSign
protected byte[] engineSign()- Specified by:
engineSignin classSignatureSpi
-
engineVerify
protected boolean engineVerify(byte[] sig) - Specified by:
engineVerifyin classSignatureSpi
-
i2os
-
os2i
-
sp1
-
vp1
-
concat
private static byte[] concat(byte[] x1, byte[] x2) -
hash
-
mgf1
-
random_os
private static byte[] random_os(int len) -
xor_os
private static byte[] xor_os(byte[] a1, byte[] a2) -
emsa_pss_encode
-
emsa_pss_verify
-
calculateEMBitLen
-
pss_sign
-
pss_verify
-