nRF9160DK ECDSA non-deterministic

Hello!
We are trying to sign our data using ECDSA (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/crypto/ecdsa/README.html), so we can send our information to an Ethereum Blockchain. We discovered that ECDSA non-deterministic algorithm is not so accurate. There is the possibility that the sign of ECDSA is not correct on the first attempt, but we need to execute our application more times.
Thank you all!

Parents
  • int verify_message(void)
    {
    	psa_status_t status;
    
    	LOG_INF("Verifying ECDSA signature...");
    
    	/* Verify the signature of the hash */
    	status = psa_verify_hash(pub_key_handle,
    				 PSA_ALG_ECDSA(PSA_ALG_SHA3_256),
    				 m_hash,
    				 sizeof(m_hash),
    				 m_signature,
    				 sizeof(m_signature));
    	if (status != PSA_SUCCESS) {
    		LOG_INF("psa_verify_hash failed! (Error: %d)", status);
    		return APP_ERROR;
    	}
    
    	LOG_INF("Signature verification was successful!");
    
    	return APP_SUCCESS;
    }

    This is the code to verify our sign but we don't know the public key.
    The problem is always the same, we need some values we can't find inside this library.
    For example, we could obtain the public key from the private key but we need the generation point G.

    "The public key is calculated from the private key using elliptic curve multiplication, which is practically irreversible: K = k * G, where k is the private key, G is a constant point called the generator pointK is the resulting public key, and * is the special elliptic curve “multiplication” operator. Note that elliptic curve multiplication is not like normal multiplication. It shares functional attributes with normal multiplication, but that is about it. For example, the reverse operation (which would be division for normal numbers), known as “finding the discrete logarithm”—i.e., calculating k if you know K—is as difficult as trying all possible values of k (a brute-force search that will likely take more time than this universe will allow for)."

    We need to use the verify method but we need the correct values.

  • Hi,

    Unfortunately, our binary library provides a specific set of features that does not include Ethereum block chain support. 

    Best regards,
    Dejan

Reply Children
No Data
Related