Skip to content

Two different token produces same message #5

@sumitsharansatsangi

Description

@sumitsharansatsangi

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions