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
    688
    Thanks
    70
    Thanked 110 Times in 66 Posts
    Rep Power
    237
    Reputation
    2856

    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,276
    Thanks
    5,752
    Thanked 4,112 Times in 1,752 Posts
    Rep Power
    1284
    Reputation
    49212

    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
    98
    Thanks
    6
    Thanked 129 Times in 40 Posts
    Rep Power
    92
    Reputation
    2590

    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
    688
    Thanks
    70
    Thanked 110 Times in 66 Posts
    Rep Power
    237
    Reputation
    2856

    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
    •