-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Android NFC signing #523
Android NFC signing #523
Conversation
Signed-off-by: Raul Metsma <[email protected]>
Signed-off-by: Lauris Kaplinski <[email protected]>
Signed-off-by: Lauris Kaplinski <[email protected]>
Signed-off-by: Lauris Kaplinski <[email protected]>
Co-authored-by: Raul Metsma <[email protected]>
…ents Signed-off-by: Lauris Kaplinski <[email protected]>
…ereference Signed-off-by: Lauris Kaplinski <[email protected]>
Fix NFC accessibility
Squashed commits: [548e2dd] Fixed some minor warnings about unused variables and potential null dereference Signed-off-by: Lauris Kaplinski <[email protected]> (+1 squashed commit) Squashed commits: [46ea501] Removed commented out code and reverted some AndroidStudio rearrangements Signed-off-by: Lauris Kaplinski <[email protected]> (+1 squashed commit) Squashed commits: [87e91ca] Update app/src/main/java/ee/ria/DigiDoc/android/Activity.java Co-authored-by: Raul Metsma <[email protected]> (+1 squashed commit) Squashed commits: [45df8a0] Some minor accessibility fixes Signed-off-by: Lauris Kaplinski <[email protected]>
Signed-off-by: Lauris Kaplinski <[email protected]>
Signed-off-by: Lauris Kaplinski <[email protected]> # Conflicts: # app/src/main/java/ee/ria/DigiDoc/android/signature/update/nfc/NFCOnSubscribe.java
Signed-off-by: Lauris Kaplinski <[email protected]>
public final int start; | ||
public final int end; | ||
|
||
public TLV(byte[] data, int start, int end) throws NFCException { |
Check notice
Code scanning / CodeQL
Useless parameter
private byte[] decryptNonce(byte[] encryptedNonce, byte[] CAN) throws NoSuchPaddingException, InvalidKeyException, NoSuchAlgorithmException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException { | ||
byte[] decryptionKey = createKey(CAN, (byte) 3); | ||
Cipher cipher = Cipher.getInstance("AES/CBC/NoPadding"); | ||
cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(decryptionKey, "AES"), new IvParameterSpec(new byte[16])); |
Check failure
Code scanning / CodeQL
Using a static initialization vector for encryption
|
||
private byte[] encryptDecryptData(byte[] data, int mode) throws NoSuchPaddingException, NoSuchAlgorithmException, InvalidKeyException, BadPaddingException, IllegalBlockSizeException, InvalidAlgorithmParameterException { | ||
SecretKeySpec secretKeySpec = new SecretKeySpec(keyEnc, "AES"); | ||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding"); |
Check failure
Code scanning / CodeQL
Use of a broken or risky cryptographic algorithm
Improve NFC design
NFC length checking fixes
MOPPAND-1170
Signed-off-by: Firstname Lastname [email protected]