Post
Topic
Board Altcoin Discussion
Re: [VNL] Vanillacoin, a quiet word of warning.
by
traumschiff
on 24/09/2015, 10:20:26 UTC
https://bitcointalk.org/index.php?topic=1189125.msg12507853#msg12507853:

Stealing code is not acceptable.  Denying the theft is even worse.

Smooth aka iCEBREAKER: This code is from the OpenSSL project from ecdhtest.c:

Code:
static EC_KEY *mk_eckey(int nid, const unsigned char *p, size_t plen)
{
    int ok = 0;
    EC_KEY *k = NULL;
    BIGNUM *priv = NULL;
    EC_POINT *pub = NULL;
    const EC_GROUP *grp;
    k = EC_KEY_new_by_curve_name(nid);
    if (!k)
        goto err;
    priv = BN_bin2bn(p, plen, NULL);
    if (!priv)
        goto err;
    if (!EC_KEY_set_private_key(k, priv))
        goto err;
    grp = EC_KEY_get0_group(k);
    pub = EC_POINT_new(grp);
    if (!pub)
        goto err;
    if (!EC_POINT_mul(grp, pub, priv, NULL, NULL, NULL))
        goto err;
    if (!EC_KEY_set_public_key(k, pub))
        goto err;
    ok = 1;
 err:
    if (priv)
        BN_clear_free(priv);
    if (pub)
        EC_POINT_free(pub);
    if (ok)
        return k;
    else if (k)
        EC_KEY_free(k);
    return NULL;
}

I agree, Bitcoin should not steal. Cool

Thank you for your support.