summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorKenny Root <kroot@google.com>2016-09-19 10:05:59 -0700
committerKenny Root <kroot@google.com>2016-09-19 10:35:48 -0700
commit5a98502a319d44db70d744c7c38e10fb6dbca4aa (patch)
tree676eb2d244495d20807825624f22f710e59016fb /annotations/generate_annotated_java_files.py
parentc7a1dc27ec1bcf789a12ca0306e7bcab7815985c (diff)
CipherTest: fix RSA encrypt and decrypt meaning
The getEncryptKey and getDecryptKey methods should be for returning normal enciphering and deciphering keys respectively. RSA keys can be used for two different purposes as outlined by PKCS 1 and are called "block types." The block type 1 is used for generating signatures. A signature is created by preparing a block type 1 plaintext then using the PrivateKey to "decrypt." Then later on anyone can verify the signature by using the matching PublicKey to "encrypt" and get the PKCS 1 formatted plaintext back. The block type 2 is used for enciphering a message to a recipient. The PublicKey is used to encrypt the message and later on only those possessing the PrivateKey can decrypt and read the plaintext. Test: vogar --mode host --classpath out/host/common/obj/JAVA_LIBRARIES/core-tests-support-hostdex_intermediates/classes.jack --classpath out/host/common/obj/JAVA_LIBRARIES/core-tests-hostdex_intermediates/classes.jack libcore/luni/src/test/java/libcore/javax/crypto/CipherTest.java Change-Id: I8c3aabe96c45a738a7929e7424efbbad3f0047b2
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions