Skip to content
This repository was archived by the owner on Apr 20, 2025. It is now read-only.
This repository was archived by the owner on Apr 20, 2025. It is now read-only.

Sign function should call decryption primitive #205

@myheroyuki

Description

@myheroyuki

I was looking through the RSA key code while working on a multiprime addition and noticed two functions called blinded_encrypt and blinded_decrypt. I looked at where they were used and it turns out that the sign function is calling the blinded_encrypt. This is backwards! The RSA RFC says the signing primitive should be identical to the decryption primitive, so we should call blinded_decrypt there instead like we do in the encryption function. In fact, we have no need for a blinded_encrypt function, and by switching over we will improve the speed of signing.

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