Sha256: 81b0f40e52ce0fd2a8790150fb4dbcb5f7c57a5060fe616a5f1bf272ae02a508

Contents?: true

Size: 806 Bytes

Versions: 7

Compression:

Stored size: 806 Bytes

Contents

#define TEST_NAME "scalarmult7"
#include "cmptest.h"

unsigned char p1[32] = {
    0x72, 0x20, 0xf0, 0x09, 0x89, 0x30, 0xa7, 0x54,
    0x74, 0x8b, 0x7d, 0xdc, 0xb4, 0x3e, 0xf7, 0x5a,
    0x0d, 0xbf, 0x3a, 0x0d, 0x26, 0x38, 0x1a, 0xf4,
    0xeb, 0xa4, 0xa9, 0x8e, 0xaa, 0x9b, 0x4e, 0xea
};

unsigned char p2[32] = {
    0x85, 0x20, 0xf0, 0x09, 0x89, 0x30, 0xa7, 0x54,
    0x74, 0x8b, 0x7d, 0xdc, 0xb4, 0x3e, 0xf7, 0x5a,
    0x0d, 0xbf, 0x3a, 0x0d, 0x26, 0x38, 0x1a, 0xf4,
    0xeb, 0xa4, 0xa9, 0x8e, 0xaa, 0x9b, 0x4e, 0x6a
};

unsigned char scalar[32];
unsigned char out1[32];
unsigned char out2[32];

int main(void)
{
    scalar[0] = 1U;
    crypto_scalarmult_curve25519(out1, scalar, p1);
    crypto_scalarmult_curve25519(out2, scalar, p2);
    printf("%d\n", !!memcmp(out1, out2, 32));

    return 0;
}

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
rbnacl-libsodium-1.0.6 vendor/libsodium/test/default/scalarmult7.c
rbnacl-libsodium-1.0.5 vendor/libsodium/test/default/scalarmult7.c
rbnacl-libsodium-1.0.4 vendor/libsodium/test/default/scalarmult7.c
rbnacl-libsodium-1.0.3 vendor/libsodium/test/default/scalarmult7.c
rbnacl-libsodium-1.0.2 vendor/libsodium/test/default/scalarmult7.c
rbnacl-libsodium-1.0.1 vendor/libsodium/test/default/scalarmult7.c
rbnacl-libsodium-1.0.0 vendor/libsodium/test/default/scalarmult7.c