Last active
          June 22, 2023 17:33 
        
      - 
      
- 
        Save phi1ipp/2b0985b2f39bd7ff341843d03e994e98 to your computer and use it in GitHub Desktop. 
Revisions
- 
        phi1ipp revised this gist Jun 22, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,6 +6,7 @@ openssl rsa -in priv.pem -pubout > pub.pem n=$(openssl rsa -pubin -in pub.pem -noout -modulus | cut -f2 -d= | xxd -r -p | base64 | sed -e 's/\//_/g' -e 's/+/-/g' -e 's/=//g') # encode exponent # standard one is 65537 e="AQAB" kty="RSA" 
- 
        phi1ipp created this gist Jun 22, 2023 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # generate RSA openssl genrsa 4096 > priv.pem openssl rsa -in priv.pem -pubout > pub.pem # encode modulus n=$(openssl rsa -pubin -in pub.pem -noout -modulus | cut -f2 -d= | xxd -r -p | base64 | sed -e 's/\//_/g' -e 's/+/-/g' -e 's/=//g') # encode exponent e=$() kty="RSA"