]>
git.ipfire.org Git - thirdparty/openssl.git/blob - include/crypto/cmll_platform.h
fe2f789173faa7d2c6288a44065d27093e9693d7
2 * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
10 #ifndef OSSL_CMLL_PLATFORM_H
11 # define OSSL_CMLL_PLATFORM_H
14 # if defined(CMLL_ASM) && (defined(__sparc) || defined(__sparc__))
16 /* Fujitsu SPARC64 X support */
17 extern unsigned int OPENSSL_sparcv9cap_P
[];
18 # include "sparc_arch.h"
20 # ifndef OPENSSL_NO_CAMELLIA
21 # define SPARC_CMLL_CAPABLE (OPENSSL_sparcv9cap_P[1] & CFR_CAMELLIA)
22 # include <openssl/camellia.h>
24 void cmll_t4_set_key(const unsigned char *key
, int bits
, CAMELLIA_KEY
*ks
);
25 void cmll_t4_encrypt(const unsigned char *in
, unsigned char *out
,
26 const CAMELLIA_KEY
*key
);
27 void cmll_t4_decrypt(const unsigned char *in
, unsigned char *out
,
28 const CAMELLIA_KEY
*key
);
30 void cmll128_t4_cbc_encrypt(const unsigned char *in
, unsigned char *out
,
31 size_t len
, const CAMELLIA_KEY
*key
,
32 unsigned char *ivec
, int /*unused*/);
33 void cmll128_t4_cbc_decrypt(const unsigned char *in
, unsigned char *out
,
34 size_t len
, const CAMELLIA_KEY
*key
,
35 unsigned char *ivec
, int /*unused*/);
36 void cmll256_t4_cbc_encrypt(const unsigned char *in
, unsigned char *out
,
37 size_t len
, const CAMELLIA_KEY
*key
,
38 unsigned char *ivec
, int /*unused*/);
39 void cmll256_t4_cbc_decrypt(const unsigned char *in
, unsigned char *out
,
40 size_t len
, const CAMELLIA_KEY
*key
,
41 unsigned char *ivec
, int /*unused*/);
42 void cmll128_t4_ctr32_encrypt(const unsigned char *in
, unsigned char *out
,
43 size_t blocks
, const CAMELLIA_KEY
*key
,
45 void cmll256_t4_ctr32_encrypt(const unsigned char *in
, unsigned char *out
,
46 size_t blocks
, const CAMELLIA_KEY
*key
,
48 # endif /* OPENSSL_NO_CAMELLIA */
50 # endif /* CMLL_ASM && sparc */
52 #endif /* OSSL_CRYPTO_CIPHERMODE_PLATFORM_H */