bc-java icon indicating copy to clipboard operation
bc-java copied to clipboard

Do the imports below and the sample code perform a CMAC calculation according to NIST SP 800-38B ?

Open smartycardpants opened this issue 11 months ago • 0 comments

import org.bouncycastle.crypto.SymmetricKey; import org.bouncycastle.crypto.SymmetricSecretKey; import org.bouncycastle.crypto.fips.FipsAES; import org.bouncycastle.crypto.fips.FipsMACOperatorFactory; import org.bouncycastle.crypto.fips.FipsOutputMACCalculator;

		FipsMACOperatorFactory<FipsAES.AuthParameters> fipsSymmetricFactory =
					new FipsAES.MACOperatorFactory();
		
		FipsOutputMACCalculator<FipsAES.AuthParameters> macCalculator =
					fipsSymmetricFactory.createOutputMACCalculator(
					aesKey, FipsAES.CMAC.withMACSize(128));
		

smartycardpants avatar Feb 12 '25 22:02 smartycardpants