Uploaded image for project: 'Embedded Software & Tools'
  1. Embedded Software & Tools
  2. EXT_EP-9560

FormatCurve25519PrivateKey function produces incorrect result

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • TI Device Drivers
    • TIDRIVERS-3910
    • TIDRIVERS_4_30_00
    • TIDRIVERS_4_40_00
    • Hide
      The function was not updated to comply with OS format. The current implementation with the bug:

      int_fast16_t ECCParams_FormatCurve25519PrivateKey(CryptoKey *myPrivateKey){
          myPrivateKey->u.plaintext.keyMaterial[0] &= 0xF8;
          myPrivateKey->u.plaintext.keyMaterial[31] &= 0x7F;
          myPrivateKey->u.plaintext.keyMaterial[31] |= 0x40;

          return ECCParams_STATUS_SUCCESS;
      }
      Should be changed to:

      int_fast16_t ECCParams_FormatCurve25519PrivateKey(CryptoKey *myPrivateKey){
          myPrivateKey->u.plaintext.keyMaterial[31] &= 0xF8;
          myPrivateKey->u.plaintext.keyMaterial[0] &= 0x7F;
          myPrivateKey->u.plaintext.keyMaterial[0] |= 0x40;

          return ECCParams_STATUS_SUCCESS;
      }
      Show
      The function was not updated to comply with OS format. The current implementation with the bug: int_fast16_t ECCParams_FormatCurve25519PrivateKey(CryptoKey *myPrivateKey){     myPrivateKey->u.plaintext.keyMaterial[0] &= 0xF8;     myPrivateKey->u.plaintext.keyMaterial[31] &= 0x7F;     myPrivateKey->u.plaintext.keyMaterial[31] |= 0x40;     return ECCParams_STATUS_SUCCESS; } Should be changed to: int_fast16_t ECCParams_FormatCurve25519PrivateKey(CryptoKey *myPrivateKey){     myPrivateKey->u.plaintext.keyMaterial[31] &= 0xF8;     myPrivateKey->u.plaintext.keyMaterial[0] &= 0x7F;     myPrivateKey->u.plaintext.keyMaterial[0] |= 0x40;     return ECCParams_STATUS_SUCCESS; }

      FormatCurve25519PrivateKey function produces incorrect result

            syncuser TI User
            syncuser TI User
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: