Closed mayankambaliya closed 4 years ago
Description of changes:
Updated AESWrapping sample to include examples on using following mechanisms:
Removed usage of AES/CBC/* mechanism for Wrapping and UnWrapping
Testing *
$java -ea -Djava.library.path=/opt/cloudhsm/lib/ -jar target/assembly/aes-wrapping-runner.jar
Original key before wrapping: 8JxVG/0d4gduS34Y7IY2AVUX91Cpt0J/JWMF+AvGCHE=
Verified key when using the HSM to wrap and unwrap with AESWrap/ECB/NoPadding: 8JxVG/0d4gduS34Y7IY2AVUX91Cpt0J/JWMF+AvGCHE=
Verified key when using the HSM to wrap and unwrap with AESWrap/ECB/PKCS5Padding: 8JxVG/0d4gduS34Y7IY2AVUX91Cpt0J/JWMF+AvGCHE=
Verified key when using the HSM to wrap and unwrap with AESWrap/ECB/ZeroPadding: 8JxVG/0d4gduS34Y7IY2AVUX91Cpt0J/JWMF+AvGCHE=
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description of changes:
Updated AESWrapping sample to include examples on using following mechanisms:
Removed usage of AES/CBC/* mechanism for Wrapping and UnWrapping
Testing *
Original key before wrapping: 8JxVG/0d4gduS34Y7IY2AVUX91Cpt0J/JWMF+AvGCHE=
Verified key when using the HSM to wrap and unwrap with AESWrap/ECB/NoPadding: 8JxVG/0d4gduS34Y7IY2AVUX91Cpt0J/JWMF+AvGCHE=
Verified key when using the HSM to wrap and unwrap with AESWrap/ECB/PKCS5Padding: 8JxVG/0d4gduS34Y7IY2AVUX91Cpt0J/JWMF+AvGCHE=
Verified key when using the HSM to wrap and unwrap with AESWrap/ECB/ZeroPadding: 8JxVG/0d4gduS34Y7IY2AVUX91Cpt0J/JWMF+AvGCHE=