I'm recently working on a project that requires attestation of generated keypair public key. Would like to know what is the reason not having R-MAC/ENC supported. Though I do see in documentation said it's not enforced, I wonder if this is simply reusing existing GP libraries. Which would be something looking like:
// STEP 1 - Generate the key pair
PIVKeyObjectPKI keyPair = (PIVKeyObjectPKI) key;
short length = keyPair.generate(scratch, ZERO);
// Added wrapping
SecureChannel sc = GPSystem.getSecureChannel();
byte mask = SecureChannel.AUTHENTICATED | SecureChannel.R_ENCRYPTION | SecureChannel.R_MAC;
if ((sc.getSecurityLevel() & mask) == mask) {
length = sc.wrap(scratch, ZERO, length);
}
I tried this customizing code snippet but the R-MAC value is not correct when receiving the response from the applet. Any suggestion making this work? I can help sending out MRs to get this supported.
Also though PIV spec doesn't specify the authenticity of the key generated, is there a recommended security scheme that how we can generate an signature from the applet as an option when generating keypair? Thanks
I'm recently working on a project that requires attestation of generated keypair public key. Would like to know what is the reason not having R-MAC/ENC supported. Though I do see in documentation said it's not enforced, I wonder if this is simply reusing existing GP libraries. Which would be something looking like:
I tried this customizing code snippet but the R-MAC value is not correct when receiving the response from the applet. Any suggestion making this work? I can help sending out MRs to get this supported.
Also though PIV spec doesn't specify the authenticity of the key generated, is there a recommended security scheme that how we can generate an signature from the applet as an option when generating keypair? Thanks