Java/JCE: Decrypting “long” message encrypted with RSA

前端 未结 3 1484
余生分开走
余生分开走 2020-12-10 00:25

I\'ve got a message contained in an byte[], encrypted with \"RSA/ECB/PKCS1Padding\". To decrypt it I create a Cipher c and initiate it with

c = Cipher.getIns         


        
3条回答
  •  隐瞒了意图╮
    2020-12-10 00:33

    I think using RSA encryption for anything but key transport is abuse.

    Generate a new key for a symmetric cipher and encrypt your bulk data with that. Then encrypt the key with RSA. Send the symmetrically-encrypted cipher-text along with the asymmetrically-encrypted content encryption key to your recipient.

提交回复
热议问题