Results 1 to 5 of 5

Thread: SHA1 with PKCS1 v1.5 - need help to understand

  1. #1
    Senior Member

    Join Date
    Jan 2008
    Location
    A rock in the ocean
    Posts
    752
    Thanks
    99
    Thanked 135 Times in 79 Posts
    Rep Power
    290
    Reputation
    3356

    Default SHA1 with PKCS1 v1.5 - need help to understand

    Trying to understand the following Python code:
    signature = signing_key.sign(payload.decode('utf-8').encode('utf-16-le'), PKCS1v15(), SHA1())

    This results in a signature digest that is 128 bytes long. SHA1 ordinarily results in 20 bytes long, so I presume it's then calling a PKCS1 function to (securely) convert that 20 bytes to 128 bytes.
    Is there a nice simple tool / application that can do this PKCS function - either encode or decode?



Look Here ->
  • #2
    Premium Member

    Join Date
    Jan 2008
    Posts
    4,311
    Thanks
    5,982
    Thanked 4,171 Times in 1,771 Posts
    Rep Power
    1348
    Reputation
    50392

    Default

    Unfortunately, I'm unable to offer a solution, but hopefully some of the results from \ will be of assistance.

    Perhaps is more suitable.
    Last edited by tristen; 22-07-20 at 10:16 PM.

  • #3
    Junior Member
    HamJammer's Avatar
    Join Date
    Nov 2017
    Location
    Pluto
    Posts
    242
    Thanks
    46
    Thanked 281 Times in 112 Posts
    Rep Power
    200
    Reputation
    5722

    Default

    Quote Originally Posted by mitaux8030 View Post
    Trying to understand the following Python code:
    signature = signing_key.sign(payload.decode('utf-8').encode('utf-16-le'), PKCS1v15(), SHA1())

    This results in a signature digest that is 128 bytes long. SHA1 ordinarily results in 20 bytes long, so I presume it's then calling a PKCS1 function to (securely) convert that 20 bytes to 128 bytes.
    Is there a nice simple tool / application that can do this PKCS function - either encode or decode?
    Are you trying to encrypt decrypted LMX files? =p For a cetrain application?

  • #4
    Senior Member

    Join Date
    Jan 2008
    Location
    A rock in the ocean
    Posts
    752
    Thanks
    99
    Thanked 135 Times in 79 Posts
    Rep Power
    290
    Reputation
    3356

    Default

    Quote Originally Posted by HamJammer View Post
    Are you trying to encrypt decrypted LMX files? =p For a cetrain application?
    Yes. Want to explore certain features not native to certain models eg: analogue on SL7550, remove firmware imposed limits and such. Slow (glacially slow!) progress being made.

  • 12-10-20, 08:48 AM


  • 12-10-20, 08:50 AM


  • #5
    Junior Member
    Join Date
    Oct 2020
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0
    Reputation
    10

    Default

    Quote Originally Posted by mitaux80452 View Post
    Trying to understand the following Python code:
    signature = signing_key.sign(payload.decode('utf-8').encode('utf-16-le'), PKCS1v15(), SHA1())

    This results in a signature digest that is 128 bytes long. SHA1 ordinarily results in 20 bytes long, so I presume it's then calling a PKCS1 function to (securely) convert that 20 bytes to 128 bytes.
    Is there a nice simple tool / application that can do this PKCS function - either encode or decode?

    Are you trying to encrypt decrypted LMX files?

  • Bookmarks

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •