Exemplo n.º 1
0
int JPAKE_STEP3A_generate(JPAKE_STEP3A *send, JPAKE_CTX *ctx)
    {
    quickhashbn(send->hhk, ctx->key);
    SHA1(send->hhk, sizeof send->hhk, send->hhk);

    return 1;
    }
int YAK_STEP3A_generate(YAK_STEP3A *send, YAK_CTX *ctx)
    {
    quickhashbn(send->hhk, ctx->key);
    SHA1(send->hhk, sizeof send->hhk, send->hhk);

    return 1;
    }
Exemplo n.º 3
0
Arquivo: jpake.c Projeto: 5y/node
int JPAKE_STEP3B_process(JPAKE_CTX *ctx, const JPAKE_STEP3B *received)
{
    unsigned char hk[SHA_DIGEST_LENGTH];

    quickhashbn(hk, ctx->key);
    if (memcmp(hk, received->hk, sizeof hk)) {
        JPAKEerr(JPAKE_F_JPAKE_STEP3B_PROCESS, JPAKE_R_HASH_OF_KEY_MISMATCH);
        return 0;
    }
    return 1;
}
Exemplo n.º 4
0
int JPAKE_STEP3A_process(JPAKE_CTX *ctx, const JPAKE_STEP3A *received)
    {
    unsigned char hhk[SHA_DIGEST_LENGTH];

    quickhashbn(hhk, ctx->key);
    SHA1(hhk, sizeof hhk, hhk);
    if(TINYCLR_SSL_MEMCMP(hhk, received->hhk, sizeof hhk))
	{
	JPAKEerr(JPAKE_F_JPAKE_STEP3A_PROCESS, JPAKE_R_HASH_OF_HASH_OF_KEY_MISMATCH);
	return 0;
	}
    return 1;
    }
int YAK_STEP3A_process(YAK_CTX *ctx, const YAK_STEP3A *received)
    {
    unsigned char hhk[SHA_DIGEST_LENGTH];

    quickhashbn(hhk, ctx->key);
    SHA1(hhk, sizeof hhk, hhk);
    if(memcmp(hhk, received->hhk, sizeof hhk))
	{
	YAKerr(YAK_F_YAK_STEP3A_PROCESS, YAK_R_HASH_OF_HASH_OF_KEY_MISMATCH);
	return 0;
	}
    return 1;
    }
Exemplo n.º 6
0
int JPAKE_STEP3B_generate(JPAKE_STEP3B *send, JPAKE_CTX *ctx)
    {
    quickhashbn(send->hk, ctx->key);

    return 1;
    }
int YAK_STEP3B_generate(YAK_STEP3B *send, YAK_CTX *ctx)
    {
    quickhashbn(send->hk, ctx->key);

    return 1;
    }