Random Padding Algorithms in Different Language Environments of RSA

    RSA random padding algorithm types, including NoPadding, ISO10126Padding, OAEPPadding, PKCS1Padding, PKCS5Padding, SSL3Padding, OAEPPadding, PKCS1Padding, etc.
    The implementation of .Net uses PKCS1Padding, and there is only one implementation.
    Java's implementation is mainly implemented through Cipher.getInstance. The incoming parameter is a string describing the operation (or set of operations) performed on a given input to produce some output. Must include the name of the encryption algorithm, possibly followed by a feedback mode and padding scheme. Such an implementation is more flexible, and we can specify different feedback modes and padding schemes through parameters; for example, Cipher.getInstance("RSA/ECB/PKCS1Padding"), or Cipher.getInstance("RSA"), but use it to encrypt The effect will be different; the default padding method in java is RSA/ECB/PKCS1Padding.
    Android's default padding algorithm is not (didn't find what it is), but can be specified as the following types.
RSA/ECB/NoPadding 1+
RSA/ECB/OAEPPadding 1+
RSA/ECB/OAEPwithSHA-1andMGF1Padding 10+
RSA/ECB/OAEPwithSHA-256andMGF1Padding 10+
RSA/ECB/PKCS1Padding 1+
RSA/NONE/NoPadding 1+
RSA/NONE/ OAEPPadding 1+
RSA/NONE/OAEPwithSHA-1andMGF1Padding 10+
RSA/NONE/OAEPwithSHA-256andMGF1Padding 10+
RSA/NONE/PKCS1Padding 1+

https://developer.android.com/reference/javax/crypto/Cipher.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326286884&siteId=291194637