xref: /freebsd/crypto/openssl/crypto/ec/curve448/arch_32/arch_intrinsics.h (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim /*
2e71b7053SJung-uk Kim  * Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
3e71b7053SJung-uk Kim  * Copyright 2016 Cryptography Research, Inc.
4e71b7053SJung-uk Kim  *
5*b077aed3SPierre Pronchery  * Licensed under the Apache License 2.0 (the "License").  You may not use
6e71b7053SJung-uk Kim  * this file except in compliance with the License.  You can obtain a copy
7e71b7053SJung-uk Kim  * in the file LICENSE in the source distribution or at
8e71b7053SJung-uk Kim  * https://www.openssl.org/source/license.html
9e71b7053SJung-uk Kim  *
10e71b7053SJung-uk Kim  * Originally written by Mike Hamburg
11e71b7053SJung-uk Kim  */
12e71b7053SJung-uk Kim 
1317f01e99SJung-uk Kim #ifndef OSSL_CRYPTO_EC_CURVE448_ARCH_32_INTRINSICS_H
1417f01e99SJung-uk Kim # define OSSL_CRYPTO_EC_CURVE448_ARCH_32_INTRINSICS_H
15e71b7053SJung-uk Kim 
1617f01e99SJung-uk Kim #include "internal/constant_time.h"
17e71b7053SJung-uk Kim 
18e71b7053SJung-uk Kim # define ARCH_WORD_BITS 32
19e71b7053SJung-uk Kim 
20e71b7053SJung-uk Kim #define word_is_zero(a)     constant_time_is_zero_32(a)
21e71b7053SJung-uk Kim 
widemul(uint32_t a,uint32_t b)22e71b7053SJung-uk Kim static ossl_inline uint64_t widemul(uint32_t a, uint32_t b)
23e71b7053SJung-uk Kim {
24e71b7053SJung-uk Kim     return ((uint64_t)a) * b;
25e71b7053SJung-uk Kim }
26e71b7053SJung-uk Kim 
2717f01e99SJung-uk Kim #endif                          /* OSSL_CRYPTO_EC_CURVE448_ARCH_32_INTRINSICS_H */
28