source: EcnlProtoTool/trunk/openssl-1.1.0e/crypto/md4/md4_locl.h@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 1.9 KB
Line 
1/*
2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
3 *
4 * Licensed under the OpenSSL license (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#include <openssl/opensslconf.h>
13#include <openssl/md4.h>
14
15void md4_block_data_order(MD4_CTX *c, const void *p, size_t num);
16
17#define DATA_ORDER_IS_LITTLE_ENDIAN
18
19#define HASH_LONG MD4_LONG
20#define HASH_CTX MD4_CTX
21#define HASH_CBLOCK MD4_CBLOCK
22#define HASH_UPDATE MD4_Update
23#define HASH_TRANSFORM MD4_Transform
24#define HASH_FINAL MD4_Final
25#define HASH_MAKE_STRING(c,s) do { \
26 unsigned long ll; \
27 ll=(c)->A; (void)HOST_l2c(ll,(s)); \
28 ll=(c)->B; (void)HOST_l2c(ll,(s)); \
29 ll=(c)->C; (void)HOST_l2c(ll,(s)); \
30 ll=(c)->D; (void)HOST_l2c(ll,(s)); \
31 } while (0)
32#define HASH_BLOCK_DATA_ORDER md4_block_data_order
33
34#include "internal/md32_common.h"
35
36/*-
37#define F(x,y,z) (((x) & (y)) | ((~(x)) & (z)))
38#define G(x,y,z) (((x) & (y)) | ((x) & ((z))) | ((y) & ((z))))
39*/
40
41/*
42 * As pointed out by Wei Dai <weidai@eskimo.com>, the above can be simplified
43 * to the code below. Wei attributes these optimizations to Peter Gutmann's
44 * SHS code, and he attributes it to Rich Schroeppel.
45 */
46#define F(b,c,d) ((((c) ^ (d)) & (b)) ^ (d))
47#define G(b,c,d) (((b) & (c)) | ((b) & (d)) | ((c) & (d)))
48#define H(b,c,d) ((b) ^ (c) ^ (d))
49
50#define R0(a,b,c,d,k,s,t) { \
51 a+=((k)+(t)+F((b),(c),(d))); \
52 a=ROTATE(a,s); };
53
54#define R1(a,b,c,d,k,s,t) { \
55 a+=((k)+(t)+G((b),(c),(d))); \
56 a=ROTATE(a,s); };\
57
58#define R2(a,b,c,d,k,s,t) { \
59 a+=((k)+(t)+H((b),(c),(d))); \
60 a=ROTATE(a,s); };
Note: See TracBrowser for help on using the repository browser.