CogniCrypt
CogniCrypt copied to clipboard
Improve error messages for KeyGenerator and Cipher
I am not sure whether this is a problem with the rule set or tool:
When I specify...
KeyGenerator kg = KeyGenerator.getInstance("RSA");
Cipher c = Cipher.getInstance("AES/CBC");
c.init(Cipher.ENCRYPT_MODE, key, iv);
... then at the KeyGenerator, CogniCrypt tells me to use any of AES, BlowFish, DESede, ... when it should really only be AES, as the Cipher is clearly using AES. It was my understanding that our rules should be able to encode this.
Cheers Eric
It is just not implemented within the tool yet.
Would be really nice to have. (and is confusing if we don't have it)
Yes, I agree. I discussed it with Stefan: Actually, there should be an error marker at the init call saying "No predicate generatedKey received for key". If we make the error marker text more explicit to include for "AES" it would be more helpful.
@johspaeth If I remember correctly, you said, you fixed this issue. Is that right?
No, I didn't and it is related to this one. I don't know when I will have time to fix it.