1 | /*
|
---|
2 | * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
|
---|
3 | *
|
---|
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
|
---|
8 | */
|
---|
9 |
|
---|
10 | #ifndef OPENSSL_NO_SIV
|
---|
11 |
|
---|
12 | typedef struct siv128_context SIV128_CONTEXT;
|
---|
13 |
|
---|
14 | SIV128_CONTEXT *ossl_siv128_new(const unsigned char *key, int klen,
|
---|
15 | EVP_CIPHER *cbc, EVP_CIPHER *ctr,
|
---|
16 | OSSL_LIB_CTX *libctx, const char *propq);
|
---|
17 | int ossl_siv128_init(SIV128_CONTEXT *ctx, const unsigned char *key, int klen,
|
---|
18 | const EVP_CIPHER *cbc, const EVP_CIPHER *ctr,
|
---|
19 | OSSL_LIB_CTX *libctx, const char *propq);
|
---|
20 | int ossl_siv128_copy_ctx(SIV128_CONTEXT *dest, SIV128_CONTEXT *src);
|
---|
21 | int ossl_siv128_aad(SIV128_CONTEXT *ctx, const unsigned char *aad, size_t len);
|
---|
22 | int ossl_siv128_encrypt(SIV128_CONTEXT *ctx,
|
---|
23 | const unsigned char *in, unsigned char *out, size_t len);
|
---|
24 | int ossl_siv128_decrypt(SIV128_CONTEXT *ctx,
|
---|
25 | const unsigned char *in, unsigned char *out, size_t len);
|
---|
26 | int ossl_siv128_finish(SIV128_CONTEXT *ctx);
|
---|
27 | int ossl_siv128_set_tag(SIV128_CONTEXT *ctx, const unsigned char *tag,
|
---|
28 | size_t len);
|
---|
29 | int ossl_siv128_get_tag(SIV128_CONTEXT *ctx, unsigned char *tag, size_t len);
|
---|
30 | int ossl_siv128_cleanup(SIV128_CONTEXT *ctx);
|
---|
31 | int ossl_siv128_speed(SIV128_CONTEXT *ctx, int arg);
|
---|
32 |
|
---|
33 | #endif /* OPENSSL_NO_SIV */
|
---|