Skip to content

[Security] Using PKCS1_v1_5 is dangeorus. #151

@spblue4422

Description

@spblue4422

Hi, while I'm reviewing your code, I noticed that you're using algorithm PKCS1_v1_5 on encryption.

def encrypt_pwd(password, public_key):
rsa_key = RSA.importKey(public_key)
encryptor = Cipher_pkcs1_v1_5.new(rsa_key)
cipher = b64encode(encryptor.encrypt(password.encode('utf-8')))
return cipher.decode('utf-8')

According to RFC 8017, PKCS_v1_5 is not recommended anymore, instead PKCS1_OAEP is recommended.

Update for this would be significantly helpful to security.
We would appreciate it if you could review the code and proceed with the update if it is deemed insecure.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions