bouncycastlekeystorefipstde

Store Wrapped Key into Bouncy Castle FIPS Key Store


I am using bouncy castle FIPS key store(BCFKS) and I am wrapping my DEK using the another AES key so it will give me a block of Encrypted DEK. now I am able to store the encrypted DEK block of bytes into BCFKS but when I have to get it I am getting the key and there is no method which will return encrypted DEK block of byte so how can I get it or how can I store my wrapped key so that I am able to get it from the BCFKS?


Solution

  • By Taking Another AES Key Will perform encryption we take our DEK as data and pass it to the another AES method then it will give us encrypted key and will do some encoding and String manipulation to convert it in bytes and pass to the encryption function.