tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

freebl_base.gypi (5709B)


      1 # This Source Code Form is subject to the terms of the Mozilla Public
      2 # License, v. 2.0. If a copy of the MPL was not distributed with this
      3 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
      4 {
      5   'sources': [
      6     'aeskeywrap.c',
      7     'cmac.c',
      8     'alghmac.c',
      9     'arcfive.c',
     10     'arcfour.c',
     11     'blake2b.c',
     12     'camellia.c',
     13     'chacha20poly1305.c',
     14     'crypto_primitives.c',
     15     'ctr.c',
     16     'cts.c',
     17     'des.c',
     18     'desblapi.c',
     19     'dh.c',
     20     'drbg.c',
     21     'dsa.c',
     22     'ec.c',
     23     'ecdecode.c',
     24     'ecl/ecp_25519.c',
     25     'ecl/ecp_secp256r1.c',
     26     'ecl/ecp_secp384r1.c',
     27     'ecl/ecp_secp521r1.c',
     28     'fipsfreebl.c',
     29     'blinit.c',
     30     'freeblver.c',
     31     'gcm.c',
     32     'hmacct.c',
     33     'jpake.c',
     34     'kyber.c',
     35     'ldvector.c',
     36     'md2.c',
     37     'md5.c',
     38     'ml_dsa.c',
     39     'mpi/mp_gf2m.c',
     40     'mpi/mpcpucache.c',
     41     'mpi/mpi.c',
     42     'mpi/mplogic.c',
     43     'mpi/mpmontg.c',
     44     'mpi/mpprime.c',
     45     'pqg.c',
     46     'rawhash.c',
     47     'rijndael.c',
     48     'rsa.c',
     49     'rsa_blind.c',
     50     'rsapkcs.c',
     51     'sha_fast.c',
     52     'shvfy.c',
     53     'sysrand.c',
     54     'tlsprfalg.c',
     55     'secmpi.c',
     56     'verified/Hacl_Hash_SHA3.c',
     57     'verified/libcrux_sha3_portable.c',
     58     'verified/libcrux_mlkem768_portable.c',
     59     'verified/libcrux_mlkem1024_portable.c',
     60     'verified/libcrux_mlkem_portable.c',
     61     'verified/libcrux_core.c',
     62     'verified/Hacl_P256.c',
     63     'verified/Hacl_P384.c',
     64     'verified/Hacl_P521.c',
     65     'sha3.c',
     66     'shake.c',
     67     'verified/Hacl_Curve25519_51.c',
     68     'verified/Hacl_Ed25519.c',
     69   ],
     70   'defines': [
     71     # For kyber-pqcrystals-ref.c. If we ever decide to support Kyber512 or
     72     # Kyber1024, we'll need to build separate static libraries with different
     73     # values of KYBER_K.
     74     'KYBER_K=3',
     75   ],
     76   'conditions': [
     77     [ 'OS=="linux" or OS=="android"', {
     78       'conditions': [
     79         [ 'target_arch=="x64"', {
     80           'sources': [
     81             'arcfour-amd64-gas.s',
     82             'mpi/mpi_amd64.c',
     83             'mpi/mpi_amd64_common.S',
     84             'mpi/mp_comba.c',
     85           ],
     86         }],
     87         [ 'target_arch=="ia32"', {
     88           'sources': [
     89             'mpi/mpi_x86.s',
     90           ],
     91         }],
     92         [ 'target_arch=="arm"', {
     93           'sources': [
     94             'mpi/mpi_arm.c',
     95           ],
     96         }],
     97         [ 'target_arch=="ppc64le"', {
     98           'sources': [
     99             'chacha20poly1305-ppc.c',
    100             'chacha20-ppc64le.S',
    101           ],
    102         }]
    103       ],
    104     }],
    105     [ 'OS=="win"', {
    106       'libraries': [
    107         '-ladvapi32',
    108       ],
    109       'conditions': [
    110         [ 'cc_use_gnu_ld!=1 and target_arch=="x64"', {
    111           'sources': [
    112             'arcfour-amd64-masm.asm',
    113             'mpi/mpi_amd64.c',
    114             'mpi/mpi_amd64_masm.asm',
    115             'mpi/mp_comba_amd64_masm.asm',
    116             'intel-aes-x64-masm.asm',
    117             'intel-gcm-x64-masm.asm',
    118           ],
    119         }],
    120         [ 'cc_use_gnu_ld!=1 and target_arch=="ia32"', {
    121           'sources': [
    122             'mpi/mpi_x86_asm.c',
    123             'intel-aes-x86-masm.asm',
    124             'intel-gcm-x86-masm.asm',
    125           ],
    126         }],
    127         [ 'cc_use_gnu_ld==1', {
    128           # mingw
    129           'sources': [
    130           ],
    131         }],
    132         [ 'cc_is_clang!=1', {
    133           # MSVC
    134           'sources': [
    135             'intel-gcm-wrap.c',
    136           ],
    137         }],
    138       ],
    139     }],
    140     ['have_int128_support==1', {
    141       'sources': [
    142         # All intel x64 and 64-bit ARM architectures get the 64 bit version.
    143         'ecl/curve25519_64.c',
    144         'verified/Hacl_Curve25519_51.c',
    145       ],
    146     }, {
    147       'sources': [
    148         # All other architectures get the generic 32 bit implementation.
    149         'ecl/curve25519_32.c',
    150       ],
    151     }],
    152     ['(target_arch!="ppc64" and target_arch!="ppc64le") or disable_altivec==1', {
    153       'sources': [
    154         # Gyp does not support per-file cflags, so working around like this.
    155         # ppc performance greatly benefits from specific flags.
    156         'sha512.c',
    157       ],
    158     }],
    159     [ 'disable_chachapoly==0', {
    160       # The ChaCha20 code is linked in through the static ssse3-crypto lib on
    161       # all platforms that support SSSE3. There are runtime checks in place to
    162       # choose the correct ChaCha implementation at runtime.
    163       'sources': [
    164         'verified/Hacl_Chacha20.c',
    165         'verified/Hacl_Chacha20Poly1305_32.c',
    166         'verified/Hacl_Poly1305_32.c',
    167       ],
    168     }],
    169     [ 'disable_deprecated_seed==0', {
    170       'sources': [
    171         'deprecated/seed.c',
    172       ],
    173     }],
    174     [ 'disable_deprecated_rc2==0', {
    175       'sources': [
    176         'deprecated/alg2268.c',
    177       ],
    178     }],
    179     [ 'disable_kyber==0', {
    180       'sources': [
    181         'kyber-pqcrystals-ref.c',
    182       ],
    183     }],
    184     [ 'fuzz==1', {
    185       'sources!': [ 'drbg.c' ],
    186       'sources': [ 'det_rng.c' ],
    187     }],
    188     [ 'fuzz_tls==1', {
    189       'defines': [
    190         'UNSAFE_FUZZER_MODE',
    191       ],
    192     }],
    193     [ 'ct_verif==1', {
    194       'defines': [
    195         'CT_VERIF',
    196       ],
    197     }],
    198     [ 'only_dev_random==1', {
    199       'defines': [
    200         'SEED_ONLY_DEV_URANDOM',
    201       ]
    202     }],
    203     [ 'OS=="mac"', {
    204       'conditions': [
    205         [ 'target_arch=="ia32"', {
    206           'sources': [
    207             'mpi/mpi_sse2.s',
    208           ],
    209           'defines': [
    210             'MP_USE_UINT_DIGIT',
    211             'MP_ASSEMBLY_MULTIPLY',
    212             'MP_ASSEMBLY_SQUARE',
    213             'MP_ASSEMBLY_DIV_2DX1D',
    214           ],
    215         }, 'target_arch=="x64"', {
    216           'sources': [
    217             'mpi/mpi_amd64.c',
    218             'mpi/mpi_amd64_common.S',
    219             'mpi/mp_comba.c',
    220           ],
    221           'defines': [
    222             'MPI_AMD64',
    223             'MP_ASSEMBLY_MULTIPLY',
    224             'NSS_USE_COMBA',
    225           ],
    226         }],
    227       ],
    228     }],
    229   ],
    230  'ldflags': [
    231    '-Wl,-Bsymbolic'
    232  ],
    233 }