How to create a key using RSA / ECB / PKCS1Padding in python?

I am struggling to find some method to use RSA in ECB mode with PKCS1 add-on in python. I looked into pyCrypto, but they do not have the PKCS1 add-on in the main branch (but do in the patch). However, I found RSA with PKCS1 in the M2Crypto package, but I'm not sure if I can choose ECB mode ...

+3
source share
1 answer

Chaining mode, such as ECB, does not make sense for RSA if you are not mistaken.

ECB is designed for block ciphers: input data is divided into blocks of equal size, and each block is encrypted separately. This causes some drawbacks, so it is best to avoid ECB mode for block ciphers.

RSA . , RSA : 1024- RSA- ( ) 117 , 128- .

, , 117 ( ) RSA- , , - , , , , , , . , , , "RSA/ECB/PKCS1Padding", , (ECB) ( , Java, ).

, RSA, : , RSA-, (, 16 ), (, AES) . ( ), ( , , , RSA).

+9

Source: https://habr.com/ru/post/1745933/


All Articles