Skip to content

ANSI 9.63 KDF #949

@harrywangca

Description

@harrywangca

I am not sure if this is a bug on demo server yet.

I am verifying ANSI 9.63 kdf vectors with the demo server. Attached is a vector file I downloaded with libacvp. You can see from time to time, ‘z’ value is 1 byte shorter than fieldSize indicated. See tcId 74, 102, 287, 1899 in the file. Likely libacvp cut the ending zero when downloading the vectors.

I’ve tried two ways to generate key data, but both failed to verify. One is padding zero to z, the other is minute 1 to fieldSize, Hope someone can tell me what is the right way to deal with this, or if this is a bug on the server.

Some details below.

Harry

environment
Demo

testSessionId
101419

vsId
295594

Algorithm registration
rv = acvp_cap_kdf135_x963_enable(ctx, &app_kdf135_x963_handler);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_set_prereq(ctx, ACVP_KDF135_X963, ACVP_PREREQ_SHA, value);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_kdf135_x963_set_parm(ctx, ACVP_KDF_X963_HASH_ALG, ACVP_SHA224);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_kdf135_x963_set_parm(ctx, ACVP_KDF_X963_HASH_ALG, ACVP_SHA256);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_kdf135_x963_set_parm(ctx, ACVP_KDF_X963_HASH_ALG, ACVP_SHA384);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_kdf135_x963_set_parm(ctx, ACVP_KDF_X963_HASH_ALG, ACVP_SHA512);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_kdf135_x963_set_parm(ctx, ACVP_KDF_X963_KEY_DATA_LEN, 128);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_kdf135_x963_set_parm(ctx, ACVP_KDF_X963_KEY_DATA_LEN, 2048);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_kdf135_x963_set_parm(ctx, ACVP_KDF_X963_FIELD_SIZE, 224);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_kdf135_x963_set_parm(ctx, ACVP_KDF_X963_FIELD_SIZE, 571);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_kdf135_x963_set_parm(ctx, ACVP_KDF_X963_SHARED_INFO_LEN, 0);
CHECK_ENABLE_CAP_RV(rv);
rv = acvp_cap_kdf135_x963_set_parm(ctx, ACVP_KDF_X963_SHARED_INFO_LEN, 512);
CHECK_ENABLE_CAP_RV(rv);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions