1e1051a39Sopenharmony_ci/* 2e1051a39Sopenharmony_ci * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 3e1051a39Sopenharmony_ci * 4e1051a39Sopenharmony_ci * Licensed under the Apache License 2.0 (the "License"). You may not use 5e1051a39Sopenharmony_ci * this file except in compliance with the License. You can obtain a copy 6e1051a39Sopenharmony_ci * in the file LICENSE in the source distribution or at 7e1051a39Sopenharmony_ci * https://www.openssl.org/source/license.html 8e1051a39Sopenharmony_ci */ 9e1051a39Sopenharmony_ci 10e1051a39Sopenharmony_ci#ifndef OPENSSL_NO_SIV 11e1051a39Sopenharmony_ci 12e1051a39Sopenharmony_citypedef struct siv128_context SIV128_CONTEXT; 13e1051a39Sopenharmony_ci 14e1051a39Sopenharmony_ciSIV128_CONTEXT *ossl_siv128_new(const unsigned char *key, int klen, 15e1051a39Sopenharmony_ci EVP_CIPHER *cbc, EVP_CIPHER *ctr, 16e1051a39Sopenharmony_ci OSSL_LIB_CTX *libctx, const char *propq); 17e1051a39Sopenharmony_ciint ossl_siv128_init(SIV128_CONTEXT *ctx, const unsigned char *key, int klen, 18e1051a39Sopenharmony_ci const EVP_CIPHER *cbc, const EVP_CIPHER *ctr, 19e1051a39Sopenharmony_ci OSSL_LIB_CTX *libctx, const char *propq); 20e1051a39Sopenharmony_ciint ossl_siv128_copy_ctx(SIV128_CONTEXT *dest, SIV128_CONTEXT *src); 21e1051a39Sopenharmony_ciint ossl_siv128_aad(SIV128_CONTEXT *ctx, const unsigned char *aad, size_t len); 22e1051a39Sopenharmony_ciint ossl_siv128_encrypt(SIV128_CONTEXT *ctx, 23e1051a39Sopenharmony_ci const unsigned char *in, unsigned char *out, size_t len); 24e1051a39Sopenharmony_ciint ossl_siv128_decrypt(SIV128_CONTEXT *ctx, 25e1051a39Sopenharmony_ci const unsigned char *in, unsigned char *out, size_t len); 26e1051a39Sopenharmony_ciint ossl_siv128_finish(SIV128_CONTEXT *ctx); 27e1051a39Sopenharmony_ciint ossl_siv128_set_tag(SIV128_CONTEXT *ctx, const unsigned char *tag, 28e1051a39Sopenharmony_ci size_t len); 29e1051a39Sopenharmony_ciint ossl_siv128_get_tag(SIV128_CONTEXT *ctx, unsigned char *tag, size_t len); 30e1051a39Sopenharmony_ciint ossl_siv128_cleanup(SIV128_CONTEXT *ctx); 31e1051a39Sopenharmony_ciint ossl_siv128_speed(SIV128_CONTEXT *ctx, int arg); 32e1051a39Sopenharmony_ci 33e1051a39Sopenharmony_ci#endif /* OPENSSL_NO_SIV */ 34