openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libgcrypt/1.8.4-r0/libgcrypt-1.8.4/mpi/ec.c
gpg_err_code_t _gcry_mpi_ec_decode_point(mpi_point_t result, gcry_mpi_t value,
                                         mpi_ec_t ec)
{
    gcry_err_code_t rc;

    if (ec && ec->dialect == ECC_DIALECT_ED25519)
        rc = _gcry_ecc_eddsa_decodepoint(value, ec, result, NULL, NULL);
    else if (ec && ec->model == MPI_EC_MONTGOMERY)
        rc = _gcry_ecc_mont_decodepoint(value, ec, result);
    else
        rc = _gcry_ecc_os2ec(result, value);

    return rc;
}
/* Given an encoded point in the MPI VALUE and a context EC, decode
 * the point according to the context and store it in RESULT.  On
 * error an error code is return but RESULT might have been changed.
 * If no context is given the function tries to decode VALUE by
 * assuming a 0x04 prefixed uncompressed encoding.  */
Given an encoded point in the MPI VALUE and a context EC, decode
the point according to the context and store it in RESULT.  On
error an error code is return but RESULT might have been changed.
If no context is given the function tries to decode VALUE by
assuming a 0x04 prefixed uncompressed encoding.
Given an encoded point in the MPI VALUE and a context EC decode the point according to the context and store it in RESULT . On error an error code is return but RESULT might have been changed . If no context is given the function tries to decode VALUE by assuming a 0x04 prefixed uncompressed encoding .
gpg_err_code_t _gcry_mpi_ec_decode_point(mpi_point_t result, gcry_mpi_t value,
                                         mpi_ec_t ec)
{
    gcry_err_code_t rc;
    if (ec && ec->dialect == ECC_DIALECT_ED25519)
        rc = _gcry_ecc_eddsa_decodepoint(value, ec, result, NULL, NULL);
    else if (ec && ec->model == MPI_EC_MONTGOMERY)
        rc = _gcry_ecc_mont_decodepoint(value, ec, result);
    else
        rc = _gcry_ecc_os2ec(result, value);
    return rc;
}
gpg_err_code_t _gcry_mpi_ec_decode_point ( mpi_point_t result , gcry_mpi_t value , mpi_ec_t ec ) { gcry_err_code_t rc ; if ( ec && ec -> dialect == ECC_DIALECT_ED25519 ) rc = _gcry_ecc_eddsa_decodepoint ( value , ec , result , NULL , NULL ) ; else if ( ec && ec -> model == MPI_EC_MONTGOMERY ) rc = _gcry_ecc_mont_decodepoint ( value , ec , result ) ; else rc = _gcry_ecc_os2ec ( result , value ) ; return rc ; }
Given an encoded point in the MPI VALUE and a context EC, decode
 the point according to the context and store it in RESULT.
Given an encoded point in the MPI VALUE and a context EC decode the point according to the context and store it in RESULT .