private Optional<SECPPublicKey> recoverPublicKeyFromSignatureNative(
      final Bytes32 dataHash, final SECPSignature signature) {
    byte[] recoveredKey;

    try {
      recoveredKey =
          libSECP256R1.keyRecovery(
              dataHash.toArrayUnsafe(),
              signature.getR().toByteArray(),
              signature.getS().toByteArray(),
              signature.getRecId());
    } catch (IllegalArgumentException e) {
      return Optional.empty();
    }

    return Optional.of(SECPPublicKey.create(Bytes.of(recoveredKey), ALGORITHM));
  }
SECP256R1 is using the non-deterministic implementation of K calculation (standard)

@return an instance of RandomDSAKCalculator
crypto/algorithms/src/main/java/org/hyperledger/besu/crypto/SECP256R1.java