Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4030594
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T11:29:30+00:00 2026-05-20T11:29:30+00:00

Hi I have generated a key pair and used the private key to generate

  • 0

Hi I have generated a key pair and used the private key to generate a signature.

openssl rsautl -sign -in helloworld.txt -inkey aa.pem -out sig

However I am unable to verify the signature with my public key:

openssl rsautl -verify -in helloworld.txt -inkey aa.pub -sigfile sig

I know there -sigfile is deprecated. and some of the online doc from openssl.org is wrong.

Whats the command I should use to verify the sig with my public key?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T11:29:30+00:00Added an answer on May 20, 2026 at 11:29 am

    I found two solutions to your problem.

    You can use rsautl that way: (with private key: my.key and public key my-pub.pem)

    $ openssl rsautl -sign -inkey my.key -out in.txt.rsa -in in.txt
    Enter pass phrase for my.key:
    $ openssl rsautl -verify -inkey my-pub.pem -in in.txt.rsa -pubin
    Bonjour
    

    With this method, all the document is included within the signature file and is outputted by the final command.

    But in my case, my certificate says: Signature Algorithm: sha1WithRSAEncryption.
    So I would recommend you to use the standard way of signing document in 4 steps: (This method is used for all asymmetric electronic signatures in order not to overcharge the signature file and/or CPU usage)

    1. Create digest of document to sign (sender)
    2. Sign digest with private key (sender)
    3. Create digest of document to verify (recipient)
    4. Verify signature with public key (recipient)

    OpenSSL does this in two steps:

    $ openssl dgst -sha256 -sign my.key -out in.txt.sha256 in.txt 
    Enter pass phrase for my.key:
    $ openssl dgst -sha256 -verify my-pub.pem -signature in.txt.sha256 in.txt  
    Verified OK
    

    With this method, you sent the recipient two documents: the original file plain text, the signature file signed digest. Attention: the signature file does not include the whole document! Only the digest.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have generated a public key, private key pair. I've set the public key
I have a key generated by SharpSSH in OpenSSH format. How do I convert
I have generated the keystore and its inner key. Then I have my signed
I am using Google maps and generated a key for debug. I have heard
I have noticed many times developers use like a quick key to generate properties
I am trying to create my public/private rsa key pair with msysgit I run
I cannot seem to ge my certificate and private key to pair up in
I see tool like SN which generates private/public key pair for signing an assembly.
I've generated an RSA symmetric key pair on a device using SecKeyGeneratePair() on a
I have some 1000 key-pair values that I will use in my j2me application,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.