-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I am not an security expert, I was just playing with the example provided in the package and found two different token is presenting the same message.
Code to produce the result :-
from paseto.protocol.version4 import create_asymmetric_key, sign, verify
message = b"this is a public message"
public_key, secret_key = create_asymmetric_key()
token = sign(message, secret_key)
token1=v4.public.dGhpcyBpcyBhIHB1YmxpYyBtZXNzYWdlu0p4hKsaiWr0VJOPTK_2Pcf_HNQ9QpFmW93jqUCQ8Hc19z0oeOSs3ftduKNrNZ-KQu_vFokm2PIvnaZGl8mCh
verified_message = verify(token1, public_key)
public_key was b'k4.public.3xOkgS26nr1iGMcpz8njtioRcgceaUTgfngWgwDq9ec='
private key was b'k4.secret.RAoDZGPQRFWJ5uLghlBKYR8BJgBNhAwlzkJj2EPzffDfE6SBLbqevWIYxynPyeO2KhFyBx5pROBeBaDAOr15w=='
token was b'v4.public.dGhpcyBpcyBhIHB1YmxpYyBtZXNzYWdlu0p4hKsaiWr0VJOPTK_2Pcf_HNQ9QpFmW93jqUCQ8Hc19z0oeOSs3ftduKNrNZ-KQu_vFokm2PIvnaZGl8mCg'
I am not sure whether this is a serious concern or not, but I'll request to have a look on it.
Metadata
Metadata
Assignees
Labels
No labels