Closed fneur closed 3 years ago
@SchulzeStTSI Steffen could you please comment if we need to make any changes here?
@oleksandrsarapulovgl May I ask another question meanwhile (until Steffen finds the time to answer yours): Why not use RSA with Optimal Asymmetric Encryption Padding (OAEP)? Is there a specific reason? (For new applications, one would expect OAEP rather than the old PKCS1 padding)
@fneur sure. There is not any specific reason, we can update that
@oleksandrsarapulovgl Thanks for your quick reply! But now let's wait and see what Steffen's decision will be. Cheers, F.
Steffen must be very busy. So I close this issue now.
Describe the bug
According to the specification (p. 25)
However, the actual cipher used is RSA_ECB_PKCS1_PADDING, hence asymmetric. The relevant call chain is as follows:
[WalletRepositoryImpl.kt] claimCertificate(...)
--->[WalletRepositoryImpl.kt] keyStoreCryptor.encrypt(qrCode)
--->[DefaultKeyStoreCryptor.kt] getSecurityKeyWrapper(keyStore).encrypt(qrCode)
--->[SecurityKeyWrapper.kt] getCipher(...) = Cipher.getInstance(RSA_ECB_PKCS1_PADDING)
Expected behaviour
As stated in the specification, a symmetric encryption algorithm should be used.
Steps to reproduce the issue
Technical details
Possible Fix
Additional context