RSA Digital Signature: SIGN in Python pyCrypto & verify in JavaScript jsrsasign

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024
  • In most cases, we want to interact our python server (Flask/Django) with multiple clients over the web that uses JavaScript. This is a demonstration of how can you generate a signature in python and verity that signature in JavaScript and Vice Versa.
    jsrsasign library test console:
    kjur.github.io...

Комментарии • 12

  • @anumsheraz4625
    @anumsheraz4625  6 лет назад +4

    Also if anyone is testing in Python3. The hash function does not takes String , instead it takes Bytes. simply add a ` b' ` before the HELLO WORLD string. e.g. message = b'HELLO WORLD'

  • @cameroncrockatt4026
    @cameroncrockatt4026 4 года назад +1

    That was helpful, thanks for making this video!

  • @anumsheraz4625
    @anumsheraz4625  6 лет назад +4

    Crypto is depricated. Use Cryptodome instead. Simple replace all Crpyto packages to Cryptodome. e.g. `from Cryptodome.Signature import PKCS1_v1_5`
    `from Cryptodome.Hash import SHA256` & `from Cryptodome.PublicKey import RSA`.

  • @naisargparmar7780
    @naisargparmar7780 5 лет назад

    How to decrypt Signature in python.? Also how to decrease the length of Generated Signature? Moreover, if I am sending this Signature in url than it will create any issue? It will required url encoding?

  • @rahul-yr
    @rahul-yr 4 года назад

    Is there any new and secure way of implemeting the signatures?

  • @pradeeprajagopal8483
    @pradeeprajagopal8483 6 лет назад

    If we need to digitally sign a file how do we do that. I have my private key stored in HSM

  • @Kabelman
    @Kabelman 6 лет назад +1

    it says my library doesnt have this modules "signature" etc

    • @anumsheraz4625
      @anumsheraz4625  6 лет назад

      Crypto is depricated. Use Cryptodome instead. Simple replace all Crpyto packages to Cryptodome. e.g. `from Cryptodome.Signature import PKCS1_v1_5`
      `from Cryptodome.Hash import SHA256` & `from Cryptodome.PublicKey import RSA`.

    • @Kabelman
      @Kabelman 6 лет назад +1

      Anum Sheraz thanks, i got it already running, but I will try that as well

  • @TUBE-bx2hm
    @TUBE-bx2hm 2 года назад

    how can i use digital signature on files (pdf for example)

  • @joekabucho1873
    @joekabucho1873 4 года назад

    Traceback (most recent call last):
    File "sign.py", line 50, in
    priv_key = RSA.importKey(private_key,passphrase='joeedu12345')
    File "/usr/lib/python3/dist-packages/Crypto/PublicKey/RSA.py", line 682, in importKey
    raise ValueError("RSA key format is not supported")
    ValueError: RSA key format is not supported

  • @sbillionairer269
    @sbillionairer269 3 года назад

    lol.... why dont u share about PDF signer