Class MLDSAEngine
java.lang.Object
org.bouncycastle.crypto.signers.mldsa.MLDSAEngine
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Method Summary
Modifier and TypeMethodDescriptionbyte[]deriveT1(byte[] rho, byte[] key, byte[] tr, byte[] s1Enc, byte[] s2Enc, byte[] t0Enc) byte[][]byte[][]generateKeyPairInternal(byte[] seed) byte[]generateMu(SHAKEDigest shake256Digest) byte[]generateSignature(byte[] mu, SHAKEDigest shake256Digest, byte[] rho, byte[] key, byte[] t0Enc, byte[] s1Enc, byte[] s2Enc, byte[] rnd) intintintstatic MLDSAEnginegetInstance(MLDSAParameters mldsaParameters, SecureRandom random) protected org.bouncycastle.crypto.signers.mldsa.SymmetricvoidinitSign(byte[] tr, boolean isPreHash, byte[] ctx) voidinitVerify(byte[] rho, byte[] encT1, boolean isPreHash, byte[] ctx) byte[]signInternal(byte[] msg, int msglen, byte[] rho, byte[] key, byte[] t0Enc, byte[] s1Enc, byte[] s2Enc, byte[] rnd) booleanverifyInternal(byte[] sig, int siglen, SHAKEDigest shake256Digest, byte[] rho, byte[] encT1) booleanverifyInternalMu(byte[] providedMu) booleanverifyInternalMuSignature(byte[] mu, byte[] sig, int siglen, SHAKEDigest shake256Digest, byte[] rho, byte[] encT1)
-
Field Details
-
DilithiumN
public static final int DilithiumN- See Also:
-
DilithiumQ
public static final int DilithiumQ- See Also:
-
DilithiumQinv
public static final int DilithiumQinv- See Also:
-
DilithiumD
public static final int DilithiumD- See Also:
-
SeedBytes
public static final int SeedBytes- See Also:
-
CrhBytes
public static final int CrhBytes- See Also:
-
RndBytes
public static final int RndBytes- See Also:
-
TrBytes
public static final int TrBytes- See Also:
-
DilithiumPolyT1PackedBytes
public static final int DilithiumPolyT1PackedBytes- See Also:
-
DilithiumPolyT0PackedBytes
public static final int DilithiumPolyT0PackedBytes- See Also:
-
-
Method Details
-
GetSymmetric
protected org.bouncycastle.crypto.signers.mldsa.Symmetric GetSymmetric() -
getDilithiumPolyEtaPackedBytes
public int getDilithiumPolyEtaPackedBytes() -
getDilithiumK
public int getDilithiumK() -
getDilithiumL
public int getDilithiumL() -
getInstance
-
generateKeyPairInternal
public byte[][] generateKeyPairInternal(byte[] seed) -
deriveT1
public byte[] deriveT1(byte[] rho, byte[] key, byte[] tr, byte[] s1Enc, byte[] s2Enc, byte[] t0Enc) -
getShake256Digest
-
initSign
public void initSign(byte[] tr, boolean isPreHash, byte[] ctx) -
initVerify
public void initVerify(byte[] rho, byte[] encT1, boolean isPreHash, byte[] ctx) -
signInternal
public byte[] signInternal(byte[] msg, int msglen, byte[] rho, byte[] key, byte[] t0Enc, byte[] s1Enc, byte[] s2Enc, byte[] rnd) -
generateMu
-
generateSignature
public byte[] generateSignature(byte[] mu, SHAKEDigest shake256Digest, byte[] rho, byte[] key, byte[] t0Enc, byte[] s1Enc, byte[] s2Enc, byte[] rnd) -
verifyInternalMu
public boolean verifyInternalMu(byte[] providedMu) -
verifyInternalMuSignature
public boolean verifyInternalMuSignature(byte[] mu, byte[] sig, int siglen, SHAKEDigest shake256Digest, byte[] rho, byte[] encT1) -
verifyInternal
public boolean verifyInternal(byte[] sig, int siglen, SHAKEDigest shake256Digest, byte[] rho, byte[] encT1) -
generateKeyPair
public byte[][] generateKeyPair()
-