FaCT/C Comparison

March 25, 2019 ยท View on GitHub

libsodium/

Implementation of crypto_secretbox and crypto_secretbox_open and underlying primitives from the libsodium library. Provides symmetric-key authenticated encryption and decryption, using primitives Poly1305 for authentication and XSalsa20 for encryption.

crypto_secretbox.fact

DefinitionFaCTC
_crypto_core_hsalsa20crypto_secretbox.fact:4-69crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c:16-95
_crypto_stream_xsalsa20crypto_secretbox.fact:71-80crypto_stream/xsalsa20/stream_xsalsa20.c:7-19
_crypto_stream_xsalsa20_xor_iccrypto_secretbox.fact:82-94crypto_stream/xsalsa20/stream_xsalsa20.c:21-34
_crypto_stream_xsalsa20_xorcrypto_secretbox.fact:96-102crypto_stream/xsalsa20/stream_xsalsa20.c:36-42
_crypto_secretbox_xsalsa20poly1305crypto_secretbox.fact:104-124crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c:6-23
_crypto_secretbox_xsalsa20poly1305_opencrypto_secretbox.fact:126-149crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c:25-47
_crypto_secretboxcrypto_secretbox.fact:151-157crypto_secretbox/crypto_secretbox.c:47-53
_crypto_secretbox_opencrypto_secretbox.fact:159-165crypto_secretbox/crypto_secretbox.c:55-61

salsa20.fact

DefinitionFaCTC
_crypto_core_salsa20salsa20.fact:6-99crypto_core/salsa/ref/core_salsa_ref.c:10-95
_crypto_stream_salsa20salsa20.fact:101-137crypto_stream/salsa20/ref/salsa20_ref.c:18-61
_crypto_stream_salsa20_xor_icsalsa20.fact:139-187crypto_stream/salsa20/ref/salsa20_ref.c:63-112

salsa20-avx2.fact

DefinitionFaCTC
_salsa_keysetupsalsa20-avx2.fact:1-17crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c:39-54
_salsa_ivsetupsalsa20-avx2.fact:19-27crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c:56-63
_salsa_ivsetup_nullsalsa20-avx2.fact:29-36crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c:56-63
_salsa20_encrypt_bytessalsa20-avx2.fact:38-43crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c:65-79
_crypto_stream_salsa20salsa20-avx2.fact:46-63crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c:81-98
_crypto_stream_salsa20_xor_icsalsa20-avx2.fact:66-86crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c:100-123

u0.fact

DefinitionFaCTC
_u1u0.fact:2-270crypto_stream/salsa20/xmm6int/u1.h
_u0u0.fact:273-505crypto_stream/salsa20/xmm6int/u0.h
u0u0.fact:507-518(no analogue)

crypto_poly1305.fact

DefinitionFaCTC
poly1305_state_internal_tcrypto_poly1305.fact:3-10crypto_onetimeauth/poly1305/donna/poly1305_donna64.h:25-32
_poly1305_blockscrypto_poly1305.fact:12-65crypto_onetimeauth/poly1305/donna/poly1305_donna64.h:61-133
_poly1305_initcrypto_poly1305.fact:67-90crypto_onetimeauth/poly1305/donna/poly1305_donna64.h:34-59
_poly1305_updatecrypto_poly1305.fact:92-143crypto_onetimeauth/poly1305/donna/poly1305_donna.c:14-56
_poly1305_finishcrypto_poly1305.fact:145-228crypto_onetimeauth/poly1305/donna/poly1305_donna64.h:135-220
_crypto_onetimeauth_poly1305crypto_poly1305.fact:230-247crypto_onetimeauth/poly1305/donna/poly1305_donna.c:58-70
_crypto_onetimeauth_poly1305_verifycrypto_poly1305.fact:249-256crypto_onetimeauth/poly1305/donna/poly1305_donna.c:102-113

stdlib.fact

DefinitionFaCTC
_crypto_verify_16stdlib.fact:1-8crypto_verify/sodium/verify.c:63-78

donna/

Implementation of Langley's curve25519-donna library, which provides the Curve25519 ECDH primitive.

curve25519-c64.fact

DefinitionFaCTC
(full implementation)curve25519-c64.factcurve25519-donna-c64.c

openssl-ssl3/

Implementation of ssl3_cbc_digest_record from OpenSSL, which computes the MAC of a padded message from a decrypted SSL3 packet, without revealing the padding length.

s3_cbc.fact

DefinitionFaCTC
(full implementation)s3_cbc.factssl/s3_cbc.c:276-482

openssl-mee/

Implementation of aesni_cbc_hmac_sha1_cipher from OpenSSL, which verifies MAC and padding of an encrypted TLS message, without revealing the padding length.

20170717_latest.fact

DefinitionFaCTC
(full implementation)20170717_latest.factcrypto/evp/e_aes_cbc_hmac_sha1.c:499-748