This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC2745R10-Q1:关于 ECDSA

Guru**** 2327850 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1500556/cc2745r10-q1-about-ecdsa

器件型号:CC2745R10-Q1

工具/软件:

您好、

我在下面的 URL 运行了示例代码、但 ECDSA_SIGN 的返回值为-32。

原因可能是什么?

ECDSA_ReturnBehavior 使用 ECDSA_return_behavior_callback 设置。

ECDSA_RETURN_BEACHY_BLOCKING 也会出现同样的现象。

还随附了使用的源代码。

[条件]
SDK:simplelink_lowpower_f3_SDK_8_30_00_11_ea [URL]


software-dl.ti.com/.../_e_c_d_s_a_8h.html

[示例]
CC27XX 和 CC35XX 器件的带有明文加密密钥的 ECDSA 签名 

此致、
Katsuya

e2e.ti.com/.../empty_5F00_ecdsa.c

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好:

    我将运行提供的代码、但与此同时、您使用的 SDK 版本是什么?

    此致、

    Nima Behmanesh

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    嗨、Nima、

    用于操作验证的 SDK 是 simplelink_lowpower_f3_SDK_8_30_00_11_ea。

    此致、

    Katsuya

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好:

    不应再使用8.30.00.11_EA 版本。 因为这是 SDK 的早期访问版本、所以它尚未经过完整的测试周期、可能会发生问题。 请转到最新的 SDK 并重新运行测试。

    此致、

    Nima Behmanesh

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    嗨、Nima、

    我检查了是否使用 SDK 8.40、并且发生了相同的问题。

    此致、

    Katsuya

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好:

     // Initialize the operation
        // For CC27XX and CC35XX devices, you must specify the curveType instead of providing a pointer to the curve like
        // the case with other devices.
        ECDSA_OperationSign_init(&operationSign);
        // operationSign.curve         = &ECCParams_NISTP256; <-- Line causing the issue
        operationSign.curveType         = ECDSA_TYPE_SEC_P_256_R1; // <-- Fix.
        operationSign.myPrivateKey      = &myPrivateKey;
        operationSign.hash              = messageHash;
        operationSign.r                 = r;
        operationSign.s                 = s;
        // Generate the signature
        operationResult = ECDSA_sign(ecdsaHandle, &operationSign);
        if (operationResult != ECDSA_STATUS_SUCCESS) {
            // Handle error
        }

    对于 CC27xx、必须指定 curveType、而不是提供曲线指针。

    希望这有所帮助。

    此致、

    Nima Behmanesh