VirtualBox

source: vbox/trunk/src/libs/openssl-3.3.2/crypto/sm3/sm3_riscv.c

Last change on this file was 108206, checked in by vboxsync, 3 months ago

openssl-3.3.2: Exported all files to OSE and removed .scm-settings ​bugref:10757

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 963 bytes
Line 
1/*
2 * Copyright 2023 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#include <stdlib.h>
11#include <string.h>
12
13#include <openssl/opensslconf.h>
14#include "internal/sm3.h"
15#include "crypto/riscv_arch.h"
16#include <stdio.h>
17
18void ossl_hwsm3_block_data_order_zvksh(SM3_CTX *c, const void *p, size_t num);
19void ossl_sm3_block_data_order(SM3_CTX *c, const void *p, size_t num);
20void ossl_hwsm3_block_data_order(SM3_CTX *c, const void *p, size_t num);
21
22void ossl_hwsm3_block_data_order(SM3_CTX *c, const void *p, size_t num)
23{
24 if (RISCV_HAS_ZVKB_AND_ZVKSH() && riscv_vlen() >= 128) {
25 ossl_hwsm3_block_data_order_zvksh(c, p, num);
26 } else {
27 ossl_sm3_block_data_order(c, p, num);
28 }
29}
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette