duanhongyi / gmssl

a python crypto for sm2/sm3/sm4
MIT License
474 stars 139 forks source link

SM2 encryption: explicitly passing random K #45

Open matbok opened 2 years ago

matbok commented 2 years ago

sign() allow the user to provide the random k, while encrypt() does not allow it... Could it be possible to change the encrypt() in order to add the k param (it could be optional, and internally generated if not provided by the user, to keep API compatibility)?