wwwtyro / cryptico

An easy-to-use encryption system utilizing RSA and AES for javascript.

Home Page:http://wwwtyro.github.com/cryptico

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get signature of data, without signing it

piranna opened this issue · comments

According to the documentation, when signing some data, the data encrypted with the public key is appended with the encryptor's public key and the signature of the encrypted data, and all of them are again encrypted again with the originator's public key.

In my use case, the originator's public key will be made publicly available, so anyone can create encrypted messages, and also they can sign this messages. Problem is, I want to use public keys as identifiers, and although I want the receiver to be able to open my encrypted (and signed) message, I don't wan't that he knows my public key/identifier if I don't trust him, so I don't want to send the public key/identifier on the message (send the message anonimously), and instead try to get it checking the signature against a list of public keys/identifiers of peers that trust on me.

So, what I'm asking about, is to be able to get the encrypted data and it's signature previously to be packed and encrypted again, so I can be able to send them without the public key.

P.D.: my use case is more complex than this, involving a signature with a permanent public key for identification purposes that it's not transfered anyway and that's the one I want only know the peers whom I have trusted before and have it on their list of public keys/identifiers for (private) identification purposes, and a session public key that's the one that the messages are encrypted and signed for authentication purposes.

public is, as the name imply, public.

"In my use case, the originator's public key will be made publicly available, so anyone can create encrypted messages"
you want everyone to be able to sign it except one specific person?

what about an Man in the middle service?

instead of send the message direct to you, it send to a server, the server knows your public key, so it can send you the message

"and although I want the receiver to be able to open my encrypted (and signed) message, I don't wan't that he knows my public key/identifier if I don't trust him"
they dont need to know you public key to read your message, they need you to know their public key, so you can send an message that only they can read (unless you send the same message to someone else)

" so I don't want to send the public key/identifier on the message (send the message anonimously), and instead try to get it checking the signature against a list of public keys/identifiers of peers that trust on me."
why not generate another key pair? one for people you know/trust
one (or more) for people who you don't know/trust?