[Tizen Application-dev] Problem in Decrypting a Signature in Tizen using APIs

Rahulroy G. rahulroy.g at nestgroup.net
Wed Jan 22 12:52:00 GMT 2014



I have a file data.txt in the build path whose hash file(hash) was
generated by the command " openssl dgst -sha256 data.txt > hash" and it
was signed by the command "openssl rsautl -sign -inkey privatekey.pem
-keyform PEM -in hash > signature"


Now I need to get the value of the hash in the device(or emulator) in
the by decrypting the signature with the public key.


The public key is available with us in the device. But I want to decrypt
the signature to get the contents of the hash and compare it with the
hash generated at the device. 

I am able to generate the hash at the device using Sha1Sum APIs. But the
decryption is not happening.


I got the contents of  the file "signature" into a ByteBuffer and I
tried using the method Verify() of ISignature class to compare the
contents but it is showing Unknown system error.


There is DecryptN() method for Ciphers which I think I don't need to


Basically I need to know how to decrypt a signed file in tizen to get
its contents. An help is greatly appreciated.






***** Confidentiality Statement/Disclaimer *****

This message and any attachments is intended for the sole use of the intended recipient. It may contain confidential information. Any unauthorized use, dissemination or modification is strictly prohibited. If you are not the intended recipient, please notify the sender immediately then delete it from all your systems, and do not copy, use or print. Internet communications are not secure and it is the responsibility of the recipient to make sure that it is virus/malicious code exempt.
The company/sender cannot be responsible for any unauthorized alterations or modifications made to the contents. If you require any form of confirmation of the contents, please contact the company/sender. The company/sender is not liable for any errors or omissions in the content of this message.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.tizen.org/pipermail/application-dev/attachments/20140122/0070a678/attachment.html>

More information about the Application-dev mailing list