mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-07-01 16:51:56 +00:00
Import code from previous AssetBuilder version
This commit is contained in:
49
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_i2osp.c
vendored
Normal file
49
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_i2osp.c
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
* algorithms in a highly modular and flexible manner.
|
||||
*
|
||||
* The library is free for all purposes without any express
|
||||
* guarantee it works.
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/**
|
||||
@file pkcs_1_i2osp.c
|
||||
Integer to Octet I2OSP, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/* always stores the same # of bytes, pads with leading zero bytes
|
||||
as required
|
||||
*/
|
||||
|
||||
/**
|
||||
PKCS #1 Integer to binary
|
||||
@param n The integer to store
|
||||
@param modulus_len The length of the RSA modulus
|
||||
@param out [out] The destination for the integer
|
||||
@return CRYPT_OK if successful
|
||||
*/
|
||||
int pkcs_1_i2osp(void *n, unsigned long modulus_len, unsigned char *out)
|
||||
{
|
||||
unsigned long size;
|
||||
|
||||
size = mp_unsigned_bin_size(n);
|
||||
|
||||
if (size > modulus_len) {
|
||||
return CRYPT_BUFFER_OVERFLOW;
|
||||
}
|
||||
|
||||
/* store it */
|
||||
zeromem(out, modulus_len);
|
||||
return mp_to_unsigned_bin(n, out+(modulus_len-size));
|
||||
}
|
||||
|
||||
#endif /* LTC_PKCS_1 */
|
||||
|
||||
|
||||
/* ref: HEAD -> master, tag: v1.18.2 */
|
||||
/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */
|
||||
/* commit time: 2018-07-01 22:49:01 +0200 */
|
106
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c
vendored
Normal file
106
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_mgf1.c
vendored
Normal file
@ -0,0 +1,106 @@
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
* algorithms in a highly modular and flexible manner.
|
||||
*
|
||||
* The library is free for all purposes without any express
|
||||
* guarantee it works.
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/**
|
||||
@file pkcs_1_mgf1.c
|
||||
The Mask Generation Function (MGF1) for PKCS #1, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/**
|
||||
Perform PKCS #1 MGF1 (internal)
|
||||
@param hash_idx The index of the hash desired
|
||||
@param seed The seed for MGF1
|
||||
@param seedlen The length of the seed
|
||||
@param mask [out] The destination
|
||||
@param masklen The length of the mask desired
|
||||
@return CRYPT_OK if successful
|
||||
*/
|
||||
int pkcs_1_mgf1(int hash_idx,
|
||||
const unsigned char *seed, unsigned long seedlen,
|
||||
unsigned char *mask, unsigned long masklen)
|
||||
{
|
||||
unsigned long hLen, x;
|
||||
ulong32 counter;
|
||||
int err;
|
||||
hash_state *md;
|
||||
unsigned char *buf;
|
||||
|
||||
LTC_ARGCHK(seed != NULL);
|
||||
LTC_ARGCHK(mask != NULL);
|
||||
|
||||
/* ensure valid hash */
|
||||
if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
/* get hash output size */
|
||||
hLen = hash_descriptor[hash_idx].hashsize;
|
||||
|
||||
/* allocate memory */
|
||||
md = XMALLOC(sizeof(hash_state));
|
||||
buf = XMALLOC(hLen);
|
||||
if (md == NULL || buf == NULL) {
|
||||
if (md != NULL) {
|
||||
XFREE(md);
|
||||
}
|
||||
if (buf != NULL) {
|
||||
XFREE(buf);
|
||||
}
|
||||
return CRYPT_MEM;
|
||||
}
|
||||
|
||||
/* start counter */
|
||||
counter = 0;
|
||||
|
||||
while (masklen > 0) {
|
||||
/* handle counter */
|
||||
STORE32H(counter, buf);
|
||||
++counter;
|
||||
|
||||
/* get hash of seed || counter */
|
||||
if ((err = hash_descriptor[hash_idx].init(md)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
if ((err = hash_descriptor[hash_idx].process(md, seed, seedlen)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
if ((err = hash_descriptor[hash_idx].process(md, buf, 4)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
if ((err = hash_descriptor[hash_idx].done(md, buf)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* store it */
|
||||
for (x = 0; x < hLen && masklen > 0; x++, masklen--) {
|
||||
*mask++ = buf[x];
|
||||
}
|
||||
}
|
||||
|
||||
err = CRYPT_OK;
|
||||
LBL_ERR:
|
||||
#ifdef LTC_CLEAN_STACK
|
||||
zeromem(buf, hLen);
|
||||
zeromem(md, sizeof(hash_state));
|
||||
#endif
|
||||
|
||||
XFREE(buf);
|
||||
XFREE(md);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#endif /* LTC_PKCS_1 */
|
||||
|
||||
/* ref: HEAD -> master, tag: v1.18.2 */
|
||||
/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */
|
||||
/* commit time: 2018-07-01 22:49:01 +0200 */
|
185
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c
vendored
Normal file
185
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_oaep_decode.c
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
* algorithms in a highly modular and flexible manner.
|
||||
*
|
||||
* The library is free for all purposes without any express
|
||||
* guarantee it works.
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/**
|
||||
@file pkcs_1_oaep_decode.c
|
||||
OAEP Padding for PKCS #1, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/**
|
||||
PKCS #1 v2.00 OAEP decode
|
||||
@param msg The encoded data to decode
|
||||
@param msglen The length of the encoded data (octets)
|
||||
@param lparam The session or system data (can be NULL)
|
||||
@param lparamlen The length of the lparam
|
||||
@param modulus_bitlen The bit length of the RSA modulus
|
||||
@param hash_idx The index of the hash desired
|
||||
@param out [out] Destination of decoding
|
||||
@param outlen [in/out] The max size and resulting size of the decoding
|
||||
@param res [out] Result of decoding, 1==valid, 0==invalid
|
||||
@return CRYPT_OK if successful
|
||||
*/
|
||||
int pkcs_1_oaep_decode(const unsigned char *msg, unsigned long msglen,
|
||||
const unsigned char *lparam, unsigned long lparamlen,
|
||||
unsigned long modulus_bitlen, int hash_idx,
|
||||
unsigned char *out, unsigned long *outlen,
|
||||
int *res)
|
||||
{
|
||||
unsigned char *DB, *seed, *mask;
|
||||
unsigned long hLen, x, y, modulus_len;
|
||||
int err, ret;
|
||||
|
||||
LTC_ARGCHK(msg != NULL);
|
||||
LTC_ARGCHK(out != NULL);
|
||||
LTC_ARGCHK(outlen != NULL);
|
||||
LTC_ARGCHK(res != NULL);
|
||||
|
||||
/* default to invalid packet */
|
||||
*res = 0;
|
||||
|
||||
/* test valid hash */
|
||||
if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
hLen = hash_descriptor[hash_idx].hashsize;
|
||||
modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0);
|
||||
|
||||
/* test hash/message size */
|
||||
if ((2*hLen >= (modulus_len - 2)) || (msglen != modulus_len)) {
|
||||
return CRYPT_PK_INVALID_SIZE;
|
||||
}
|
||||
|
||||
/* allocate ram for DB/mask/salt of size modulus_len */
|
||||
DB = XMALLOC(modulus_len);
|
||||
mask = XMALLOC(modulus_len);
|
||||
seed = XMALLOC(hLen);
|
||||
if (DB == NULL || mask == NULL || seed == NULL) {
|
||||
if (DB != NULL) {
|
||||
XFREE(DB);
|
||||
}
|
||||
if (mask != NULL) {
|
||||
XFREE(mask);
|
||||
}
|
||||
if (seed != NULL) {
|
||||
XFREE(seed);
|
||||
}
|
||||
return CRYPT_MEM;
|
||||
}
|
||||
|
||||
/* ok so it's now in the form
|
||||
|
||||
0x00 || maskedseed || maskedDB
|
||||
|
||||
1 || hLen || modulus_len - hLen - 1
|
||||
|
||||
*/
|
||||
|
||||
ret = CRYPT_OK;
|
||||
|
||||
/* must have leading 0x00 byte */
|
||||
if (msg[0] != 0x00) {
|
||||
ret = CRYPT_INVALID_PACKET;
|
||||
}
|
||||
|
||||
/* now read the masked seed */
|
||||
x = 1;
|
||||
XMEMCPY(seed, msg + x, hLen);
|
||||
x += hLen;
|
||||
|
||||
/* now read the masked DB */
|
||||
XMEMCPY(DB, msg + x, modulus_len - hLen - 1);
|
||||
x += modulus_len - hLen - 1;
|
||||
|
||||
/* compute MGF1 of maskedDB (hLen) */
|
||||
if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* XOR against seed */
|
||||
for (y = 0; y < hLen; y++) {
|
||||
seed[y] ^= mask[y];
|
||||
}
|
||||
|
||||
/* compute MGF1 of seed (k - hlen - 1) */
|
||||
if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* xor against DB */
|
||||
for (y = 0; y < (modulus_len - hLen - 1); y++) {
|
||||
DB[y] ^= mask[y];
|
||||
}
|
||||
|
||||
/* now DB == lhash || PS || 0x01 || M, PS == k - mlen - 2hlen - 2 zeroes */
|
||||
|
||||
/* compute lhash and store it in seed [reuse temps!] */
|
||||
x = modulus_len;
|
||||
if (lparam != NULL) {
|
||||
if ((err = hash_memory(hash_idx, lparam, lparamlen, seed, &x)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
} else {
|
||||
/* can't pass hash_memory a NULL so use DB with zero length */
|
||||
if ((err = hash_memory(hash_idx, DB, 0, seed, &x)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
/* compare the lhash'es */
|
||||
if (XMEM_NEQ(seed, DB, hLen) != 0) {
|
||||
ret = CRYPT_INVALID_PACKET;
|
||||
}
|
||||
|
||||
/* now zeroes before a 0x01 */
|
||||
for (x = hLen; x < (modulus_len - hLen - 1) && DB[x] == 0x00; x++) {
|
||||
/* step... */
|
||||
}
|
||||
|
||||
/* error if wasn't 0x01 */
|
||||
if (x == (modulus_len - hLen - 1) || DB[x] != 0x01) {
|
||||
ret = CRYPT_INVALID_PACKET;
|
||||
}
|
||||
|
||||
/* rest is the message (and skip 0x01) */
|
||||
if ((modulus_len - hLen - 1 - ++x) > *outlen) {
|
||||
ret = CRYPT_INVALID_PACKET;
|
||||
}
|
||||
|
||||
if (ret == CRYPT_OK) {
|
||||
/* copy message */
|
||||
*outlen = modulus_len - hLen - 1 - x;
|
||||
XMEMCPY(out, DB + x, modulus_len - hLen - 1 - x);
|
||||
|
||||
/* valid packet */
|
||||
*res = 1;
|
||||
}
|
||||
err = ret;
|
||||
|
||||
LBL_ERR:
|
||||
#ifdef LTC_CLEAN_STACK
|
||||
zeromem(DB, modulus_len);
|
||||
zeromem(seed, hLen);
|
||||
zeromem(mask, modulus_len);
|
||||
#endif
|
||||
|
||||
XFREE(seed);
|
||||
XFREE(mask);
|
||||
XFREE(DB);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#endif /* LTC_PKCS_1 */
|
||||
|
||||
/* ref: HEAD -> master, tag: v1.18.2 */
|
||||
/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */
|
||||
/* commit time: 2018-07-01 22:49:01 +0200 */
|
171
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c
vendored
Normal file
171
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_oaep_encode.c
vendored
Normal file
@ -0,0 +1,171 @@
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
* algorithms in a highly modular and flexible manner.
|
||||
*
|
||||
* The library is free for all purposes without any express
|
||||
* guarantee it works.
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/**
|
||||
@file pkcs_1_oaep_encode.c
|
||||
OAEP Padding for PKCS #1, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/**
|
||||
PKCS #1 v2.00 OAEP encode
|
||||
@param msg The data to encode
|
||||
@param msglen The length of the data to encode (octets)
|
||||
@param lparam A session or system parameter (can be NULL)
|
||||
@param lparamlen The length of the lparam data
|
||||
@param modulus_bitlen The bit length of the RSA modulus
|
||||
@param prng An active PRNG state
|
||||
@param prng_idx The index of the PRNG desired
|
||||
@param hash_idx The index of the hash desired
|
||||
@param out [out] The destination for the encoded data
|
||||
@param outlen [in/out] The max size and resulting size of the encoded data
|
||||
@return CRYPT_OK if successful
|
||||
*/
|
||||
int pkcs_1_oaep_encode(const unsigned char *msg, unsigned long msglen,
|
||||
const unsigned char *lparam, unsigned long lparamlen,
|
||||
unsigned long modulus_bitlen, prng_state *prng,
|
||||
int prng_idx, int hash_idx,
|
||||
unsigned char *out, unsigned long *outlen)
|
||||
{
|
||||
unsigned char *DB, *seed, *mask;
|
||||
unsigned long hLen, x, y, modulus_len;
|
||||
int err;
|
||||
|
||||
LTC_ARGCHK(msg != NULL);
|
||||
LTC_ARGCHK(out != NULL);
|
||||
LTC_ARGCHK(outlen != NULL);
|
||||
|
||||
/* test valid hash */
|
||||
if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
/* valid prng */
|
||||
if ((err = prng_is_valid(prng_idx)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
hLen = hash_descriptor[hash_idx].hashsize;
|
||||
modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0);
|
||||
|
||||
/* test message size */
|
||||
if ((2*hLen >= (modulus_len - 2)) || (msglen > (modulus_len - 2*hLen - 2))) {
|
||||
return CRYPT_PK_INVALID_SIZE;
|
||||
}
|
||||
|
||||
/* allocate ram for DB/mask/salt of size modulus_len */
|
||||
DB = XMALLOC(modulus_len);
|
||||
mask = XMALLOC(modulus_len);
|
||||
seed = XMALLOC(hLen);
|
||||
if (DB == NULL || mask == NULL || seed == NULL) {
|
||||
if (DB != NULL) {
|
||||
XFREE(DB);
|
||||
}
|
||||
if (mask != NULL) {
|
||||
XFREE(mask);
|
||||
}
|
||||
if (seed != NULL) {
|
||||
XFREE(seed);
|
||||
}
|
||||
return CRYPT_MEM;
|
||||
}
|
||||
|
||||
/* get lhash */
|
||||
/* DB == lhash || PS || 0x01 || M, PS == k - mlen - 2hlen - 2 zeroes */
|
||||
x = modulus_len;
|
||||
if (lparam != NULL) {
|
||||
if ((err = hash_memory(hash_idx, lparam, lparamlen, DB, &x)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
} else {
|
||||
/* can't pass hash_memory a NULL so use DB with zero length */
|
||||
if ((err = hash_memory(hash_idx, DB, 0, DB, &x)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
/* append PS then 0x01 (to lhash) */
|
||||
x = hLen;
|
||||
y = modulus_len - msglen - 2*hLen - 2;
|
||||
XMEMSET(DB+x, 0, y);
|
||||
x += y;
|
||||
|
||||
/* 0x01 byte */
|
||||
DB[x++] = 0x01;
|
||||
|
||||
/* message (length = msglen) */
|
||||
XMEMCPY(DB+x, msg, msglen);
|
||||
x += msglen;
|
||||
|
||||
/* now choose a random seed */
|
||||
if (prng_descriptor[prng_idx].read(seed, hLen, prng) != hLen) {
|
||||
err = CRYPT_ERROR_READPRNG;
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* compute MGF1 of seed (k - hlen - 1) */
|
||||
if ((err = pkcs_1_mgf1(hash_idx, seed, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* xor against DB */
|
||||
for (y = 0; y < (modulus_len - hLen - 1); y++) {
|
||||
DB[y] ^= mask[y];
|
||||
}
|
||||
|
||||
/* compute MGF1 of maskedDB (hLen) */
|
||||
if ((err = pkcs_1_mgf1(hash_idx, DB, modulus_len - hLen - 1, mask, hLen)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* XOR against seed */
|
||||
for (y = 0; y < hLen; y++) {
|
||||
seed[y] ^= mask[y];
|
||||
}
|
||||
|
||||
/* create string of length modulus_len */
|
||||
if (*outlen < modulus_len) {
|
||||
*outlen = modulus_len;
|
||||
err = CRYPT_BUFFER_OVERFLOW;
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* start output which is 0x00 || maskedSeed || maskedDB */
|
||||
x = 0;
|
||||
out[x++] = 0x00;
|
||||
XMEMCPY(out+x, seed, hLen);
|
||||
x += hLen;
|
||||
XMEMCPY(out+x, DB, modulus_len - hLen - 1);
|
||||
x += modulus_len - hLen - 1;
|
||||
|
||||
*outlen = x;
|
||||
|
||||
err = CRYPT_OK;
|
||||
LBL_ERR:
|
||||
#ifdef LTC_CLEAN_STACK
|
||||
zeromem(DB, modulus_len);
|
||||
zeromem(seed, hLen);
|
||||
zeromem(mask, modulus_len);
|
||||
#endif
|
||||
|
||||
XFREE(seed);
|
||||
XFREE(mask);
|
||||
XFREE(DB);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#endif /* LTC_PKCS_1 */
|
||||
|
||||
|
||||
/* ref: HEAD -> master, tag: v1.18.2 */
|
||||
/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */
|
||||
/* commit time: 2018-07-01 22:49:01 +0200 */
|
34
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_os2ip.c
vendored
Normal file
34
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_os2ip.c
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
* algorithms in a highly modular and flexible manner.
|
||||
*
|
||||
* The library is free for all purposes without any express
|
||||
* guarantee it works.
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/**
|
||||
@file pkcs_1_os2ip.c
|
||||
Octet to Integer OS2IP, Tom St Denis
|
||||
*/
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/**
|
||||
Read a binary string into an mp_int
|
||||
@param n [out] The mp_int destination
|
||||
@param in The binary string to read
|
||||
@param inlen The length of the binary string
|
||||
@return CRYPT_OK if successful
|
||||
*/
|
||||
int pkcs_1_os2ip(void *n, unsigned char *in, unsigned long inlen)
|
||||
{
|
||||
return mp_read_unsigned_bin(n, in, inlen);
|
||||
}
|
||||
|
||||
#endif /* LTC_PKCS_1 */
|
||||
|
||||
|
||||
/* ref: HEAD -> master, tag: v1.18.2 */
|
||||
/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */
|
||||
/* commit time: 2018-07-01 22:49:01 +0200 */
|
176
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c
vendored
Normal file
176
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_pss_decode.c
vendored
Normal file
@ -0,0 +1,176 @@
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
* algorithms in a highly modular and flexible manner.
|
||||
*
|
||||
* The library is free for all purposes without any express
|
||||
* guarantee it works.
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/**
|
||||
@file pkcs_1_pss_decode.c
|
||||
PKCS #1 PSS Signature Padding, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/**
|
||||
PKCS #1 v2.00 PSS decode
|
||||
@param msghash The hash to verify
|
||||
@param msghashlen The length of the hash (octets)
|
||||
@param sig The signature data (encoded data)
|
||||
@param siglen The length of the signature data (octets)
|
||||
@param saltlen The length of the salt used (octets)
|
||||
@param hash_idx The index of the hash desired
|
||||
@param modulus_bitlen The bit length of the RSA modulus
|
||||
@param res [out] The result of the comparison, 1==valid, 0==invalid
|
||||
@return CRYPT_OK if successful (even if the comparison failed)
|
||||
*/
|
||||
int pkcs_1_pss_decode(const unsigned char *msghash, unsigned long msghashlen,
|
||||
const unsigned char *sig, unsigned long siglen,
|
||||
unsigned long saltlen, int hash_idx,
|
||||
unsigned long modulus_bitlen, int *res)
|
||||
{
|
||||
unsigned char *DB, *mask, *salt, *hash;
|
||||
unsigned long x, y, hLen, modulus_len;
|
||||
int err;
|
||||
hash_state md;
|
||||
|
||||
LTC_ARGCHK(msghash != NULL);
|
||||
LTC_ARGCHK(res != NULL);
|
||||
|
||||
/* default to invalid */
|
||||
*res = 0;
|
||||
|
||||
/* ensure hash is valid */
|
||||
if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
hLen = hash_descriptor[hash_idx].hashsize;
|
||||
modulus_bitlen--;
|
||||
modulus_len = (modulus_bitlen>>3) + (modulus_bitlen & 7 ? 1 : 0);
|
||||
|
||||
/* check sizes */
|
||||
if ((saltlen > modulus_len) ||
|
||||
(modulus_len < hLen + saltlen + 2)) {
|
||||
return CRYPT_PK_INVALID_SIZE;
|
||||
}
|
||||
|
||||
/* allocate ram for DB/mask/salt/hash of size modulus_len */
|
||||
DB = XMALLOC(modulus_len);
|
||||
mask = XMALLOC(modulus_len);
|
||||
salt = XMALLOC(modulus_len);
|
||||
hash = XMALLOC(modulus_len);
|
||||
if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) {
|
||||
if (DB != NULL) {
|
||||
XFREE(DB);
|
||||
}
|
||||
if (mask != NULL) {
|
||||
XFREE(mask);
|
||||
}
|
||||
if (salt != NULL) {
|
||||
XFREE(salt);
|
||||
}
|
||||
if (hash != NULL) {
|
||||
XFREE(hash);
|
||||
}
|
||||
return CRYPT_MEM;
|
||||
}
|
||||
|
||||
/* ensure the 0xBC byte */
|
||||
if (sig[siglen-1] != 0xBC) {
|
||||
err = CRYPT_INVALID_PACKET;
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* copy out the DB */
|
||||
x = 0;
|
||||
XMEMCPY(DB, sig + x, modulus_len - hLen - 1);
|
||||
x += modulus_len - hLen - 1;
|
||||
|
||||
/* copy out the hash */
|
||||
XMEMCPY(hash, sig + x, hLen);
|
||||
/* x += hLen; */
|
||||
|
||||
/* check the MSB */
|
||||
if ((sig[0] & ~(0xFF >> ((modulus_len<<3) - (modulus_bitlen)))) != 0) {
|
||||
err = CRYPT_INVALID_PACKET;
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* generate mask of length modulus_len - hLen - 1 from hash */
|
||||
if ((err = pkcs_1_mgf1(hash_idx, hash, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* xor against DB */
|
||||
for (y = 0; y < (modulus_len - hLen - 1); y++) {
|
||||
DB[y] ^= mask[y];
|
||||
}
|
||||
|
||||
/* now clear the first byte [make sure smaller than modulus] */
|
||||
DB[0] &= 0xFF >> ((modulus_len<<3) - (modulus_bitlen));
|
||||
|
||||
/* DB = PS || 0x01 || salt, PS == modulus_len - saltlen - hLen - 2 zero bytes */
|
||||
|
||||
/* check for zeroes and 0x01 */
|
||||
for (x = 0; x < modulus_len - saltlen - hLen - 2; x++) {
|
||||
if (DB[x] != 0x00) {
|
||||
err = CRYPT_INVALID_PACKET;
|
||||
goto LBL_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
/* check for the 0x01 */
|
||||
if (DB[x++] != 0x01) {
|
||||
err = CRYPT_INVALID_PACKET;
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* M = (eight) 0x00 || msghash || salt, mask = H(M) */
|
||||
if ((err = hash_descriptor[hash_idx].init(&md)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
zeromem(mask, 8);
|
||||
if ((err = hash_descriptor[hash_idx].process(&md, mask, 8)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
if ((err = hash_descriptor[hash_idx].process(&md, msghash, msghashlen)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
if ((err = hash_descriptor[hash_idx].process(&md, DB+x, saltlen)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
if ((err = hash_descriptor[hash_idx].done(&md, mask)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* mask == hash means valid signature */
|
||||
if (XMEM_NEQ(mask, hash, hLen) == 0) {
|
||||
*res = 1;
|
||||
}
|
||||
|
||||
err = CRYPT_OK;
|
||||
LBL_ERR:
|
||||
#ifdef LTC_CLEAN_STACK
|
||||
zeromem(DB, modulus_len);
|
||||
zeromem(mask, modulus_len);
|
||||
zeromem(salt, modulus_len);
|
||||
zeromem(hash, modulus_len);
|
||||
#endif
|
||||
|
||||
XFREE(hash);
|
||||
XFREE(salt);
|
||||
XFREE(mask);
|
||||
XFREE(DB);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#endif /* LTC_PKCS_1 */
|
||||
|
||||
/* ref: HEAD -> master, tag: v1.18.2 */
|
||||
/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */
|
||||
/* commit time: 2018-07-01 22:49:01 +0200 */
|
174
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c
vendored
Normal file
174
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_pss_encode.c
vendored
Normal file
@ -0,0 +1,174 @@
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
* algorithms in a highly modular and flexible manner.
|
||||
*
|
||||
* The library is free for all purposes without any express
|
||||
* guarantee it works.
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/**
|
||||
@file pkcs_1_pss_encode.c
|
||||
PKCS #1 PSS Signature Padding, Tom St Denis
|
||||
*/
|
||||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/**
|
||||
PKCS #1 v2.00 Signature Encoding
|
||||
@param msghash The hash to encode
|
||||
@param msghashlen The length of the hash (octets)
|
||||
@param saltlen The length of the salt desired (octets)
|
||||
@param prng An active PRNG context
|
||||
@param prng_idx The index of the PRNG desired
|
||||
@param hash_idx The index of the hash desired
|
||||
@param modulus_bitlen The bit length of the RSA modulus
|
||||
@param out [out] The destination of the encoding
|
||||
@param outlen [in/out] The max size and resulting size of the encoded data
|
||||
@return CRYPT_OK if successful
|
||||
*/
|
||||
int pkcs_1_pss_encode(const unsigned char *msghash, unsigned long msghashlen,
|
||||
unsigned long saltlen, prng_state *prng,
|
||||
int prng_idx, int hash_idx,
|
||||
unsigned long modulus_bitlen,
|
||||
unsigned char *out, unsigned long *outlen)
|
||||
{
|
||||
unsigned char *DB, *mask, *salt, *hash;
|
||||
unsigned long x, y, hLen, modulus_len;
|
||||
int err;
|
||||
hash_state md;
|
||||
|
||||
LTC_ARGCHK(msghash != NULL);
|
||||
LTC_ARGCHK(out != NULL);
|
||||
LTC_ARGCHK(outlen != NULL);
|
||||
|
||||
/* ensure hash and PRNG are valid */
|
||||
if ((err = hash_is_valid(hash_idx)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
if ((err = prng_is_valid(prng_idx)) != CRYPT_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
hLen = hash_descriptor[hash_idx].hashsize;
|
||||
modulus_bitlen--;
|
||||
modulus_len = (modulus_bitlen>>3) + (modulus_bitlen & 7 ? 1 : 0);
|
||||
|
||||
/* check sizes */
|
||||
if ((saltlen > modulus_len) || (modulus_len < hLen + saltlen + 2)) {
|
||||
return CRYPT_PK_INVALID_SIZE;
|
||||
}
|
||||
|
||||
/* allocate ram for DB/mask/salt/hash of size modulus_len */
|
||||
DB = XMALLOC(modulus_len);
|
||||
mask = XMALLOC(modulus_len);
|
||||
salt = XMALLOC(modulus_len);
|
||||
hash = XMALLOC(modulus_len);
|
||||
if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) {
|
||||
if (DB != NULL) {
|
||||
XFREE(DB);
|
||||
}
|
||||
if (mask != NULL) {
|
||||
XFREE(mask);
|
||||
}
|
||||
if (salt != NULL) {
|
||||
XFREE(salt);
|
||||
}
|
||||
if (hash != NULL) {
|
||||
XFREE(hash);
|
||||
}
|
||||
return CRYPT_MEM;
|
||||
}
|
||||
|
||||
|
||||
/* generate random salt */
|
||||
if (saltlen > 0) {
|
||||
if (prng_descriptor[prng_idx].read(salt, saltlen, prng) != saltlen) {
|
||||
err = CRYPT_ERROR_READPRNG;
|
||||
goto LBL_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
/* M = (eight) 0x00 || msghash || salt, hash = H(M) */
|
||||
if ((err = hash_descriptor[hash_idx].init(&md)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
zeromem(DB, 8);
|
||||
if ((err = hash_descriptor[hash_idx].process(&md, DB, 8)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
if ((err = hash_descriptor[hash_idx].process(&md, msghash, msghashlen)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
if ((err = hash_descriptor[hash_idx].process(&md, salt, saltlen)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
if ((err = hash_descriptor[hash_idx].done(&md, hash)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* generate DB = PS || 0x01 || salt, PS == modulus_len - saltlen - hLen - 2 zero bytes */
|
||||
x = 0;
|
||||
XMEMSET(DB + x, 0, modulus_len - saltlen - hLen - 2);
|
||||
x += modulus_len - saltlen - hLen - 2;
|
||||
DB[x++] = 0x01;
|
||||
XMEMCPY(DB + x, salt, saltlen);
|
||||
/* x += saltlen; */
|
||||
|
||||
/* generate mask of length modulus_len - hLen - 1 from hash */
|
||||
if ((err = pkcs_1_mgf1(hash_idx, hash, hLen, mask, modulus_len - hLen - 1)) != CRYPT_OK) {
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* xor against DB */
|
||||
for (y = 0; y < (modulus_len - hLen - 1); y++) {
|
||||
DB[y] ^= mask[y];
|
||||
}
|
||||
|
||||
/* output is DB || hash || 0xBC */
|
||||
if (*outlen < modulus_len) {
|
||||
*outlen = modulus_len;
|
||||
err = CRYPT_BUFFER_OVERFLOW;
|
||||
goto LBL_ERR;
|
||||
}
|
||||
|
||||
/* DB len = modulus_len - hLen - 1 */
|
||||
y = 0;
|
||||
XMEMCPY(out + y, DB, modulus_len - hLen - 1);
|
||||
y += modulus_len - hLen - 1;
|
||||
|
||||
/* hash */
|
||||
XMEMCPY(out + y, hash, hLen);
|
||||
y += hLen;
|
||||
|
||||
/* 0xBC */
|
||||
out[y] = 0xBC;
|
||||
|
||||
/* now clear the 8*modulus_len - modulus_bitlen most significant bits */
|
||||
out[0] &= 0xFF >> ((modulus_len<<3) - modulus_bitlen);
|
||||
|
||||
/* store output size */
|
||||
*outlen = modulus_len;
|
||||
err = CRYPT_OK;
|
||||
LBL_ERR:
|
||||
#ifdef LTC_CLEAN_STACK
|
||||
zeromem(DB, modulus_len);
|
||||
zeromem(mask, modulus_len);
|
||||
zeromem(salt, modulus_len);
|
||||
zeromem(hash, modulus_len);
|
||||
#endif
|
||||
|
||||
XFREE(hash);
|
||||
XFREE(salt);
|
||||
XFREE(mask);
|
||||
XFREE(DB);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#endif /* LTC_PKCS_1 */
|
||||
|
||||
/* ref: HEAD -> master, tag: v1.18.2 */
|
||||
/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */
|
||||
/* commit time: 2018-07-01 22:49:01 +0200 */
|
112
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_v1_5_decode.c
vendored
Normal file
112
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_v1_5_decode.c
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
* algorithms in a highly modular and flexible manner.
|
||||
*
|
||||
* The library is free for all purposes without any express
|
||||
* guarantee it works.
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/** @file pkcs_1_v1_5_decode.c
|
||||
*
|
||||
* PKCS #1 v1.5 Padding. (Andreas Lange)
|
||||
*/
|
||||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/** @brief PKCS #1 v1.5 decode.
|
||||
*
|
||||
* @param msg The encoded data to decode
|
||||
* @param msglen The length of the encoded data (octets)
|
||||
* @param block_type Block type to use in padding (\sa ltc_pkcs_1_v1_5_blocks)
|
||||
* @param modulus_bitlen The bit length of the RSA modulus
|
||||
* @param out [out] Destination of decoding
|
||||
* @param outlen [in/out] The max size and resulting size of the decoding
|
||||
* @param is_valid [out] Boolean whether the padding was valid
|
||||
*
|
||||
* @return CRYPT_OK if successful
|
||||
*/
|
||||
int pkcs_1_v1_5_decode(const unsigned char *msg,
|
||||
unsigned long msglen,
|
||||
int block_type,
|
||||
unsigned long modulus_bitlen,
|
||||
unsigned char *out,
|
||||
unsigned long *outlen,
|
||||
int *is_valid)
|
||||
{
|
||||
unsigned long modulus_len, ps_len, i;
|
||||
int result;
|
||||
|
||||
/* default to invalid packet */
|
||||
*is_valid = 0;
|
||||
|
||||
modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0);
|
||||
|
||||
/* test message size */
|
||||
|
||||
if ((msglen > modulus_len) || (modulus_len < 11)) {
|
||||
return CRYPT_PK_INVALID_SIZE;
|
||||
}
|
||||
|
||||
result = CRYPT_OK;
|
||||
|
||||
/* separate encoded message */
|
||||
|
||||
if ((msg[0] != 0x00) || (msg[1] != (unsigned char)block_type)) {
|
||||
result = CRYPT_INVALID_PACKET;
|
||||
}
|
||||
|
||||
if (block_type == LTC_PKCS_1_EME) {
|
||||
for (i = 2; i < modulus_len; i++) {
|
||||
/* separator */
|
||||
if (msg[i] == 0x00) { break; }
|
||||
}
|
||||
ps_len = i++ - 2;
|
||||
|
||||
if (i >= modulus_len) {
|
||||
/* There was no octet with hexadecimal value 0x00 to separate ps from m.
|
||||
*/
|
||||
result = CRYPT_INVALID_PACKET;
|
||||
}
|
||||
} else {
|
||||
for (i = 2; i < modulus_len - 1; i++) {
|
||||
if (msg[i] != 0xFF) { break; }
|
||||
}
|
||||
|
||||
/* separator check */
|
||||
if (msg[i] != 0) {
|
||||
/* There was no octet with hexadecimal value 0x00 to separate ps from m. */
|
||||
result = CRYPT_INVALID_PACKET;
|
||||
}
|
||||
|
||||
ps_len = i - 2;
|
||||
}
|
||||
|
||||
if (ps_len < 8)
|
||||
{
|
||||
/* The length of ps is less than 8 octets.
|
||||
*/
|
||||
result = CRYPT_INVALID_PACKET;
|
||||
}
|
||||
|
||||
if (*outlen < (msglen - (2 + ps_len + 1))) {
|
||||
result = CRYPT_INVALID_PACKET;
|
||||
}
|
||||
|
||||
if (result == CRYPT_OK) {
|
||||
*outlen = (msglen - (2 + ps_len + 1));
|
||||
XMEMCPY(out, &msg[2 + ps_len + 1], *outlen);
|
||||
|
||||
/* valid packet */
|
||||
*is_valid = 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
} /* pkcs_1_v1_5_decode */
|
||||
|
||||
#endif /* #ifdef LTC_PKCS_1 */
|
||||
|
||||
/* ref: HEAD -> master, tag: v1.18.2 */
|
||||
/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */
|
||||
/* commit time: 2018-07-01 22:49:01 +0200 */
|
109
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_v1_5_encode.c
vendored
Normal file
109
thirdparty/libtomcrypt/pk/pkcs1/pkcs_1_v1_5_encode.c
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
/* LibTomCrypt, modular cryptographic library -- Tom St Denis
|
||||
*
|
||||
* LibTomCrypt is a library that provides various cryptographic
|
||||
* algorithms in a highly modular and flexible manner.
|
||||
*
|
||||
* The library is free for all purposes without any express
|
||||
* guarantee it works.
|
||||
*/
|
||||
#include "tomcrypt.h"
|
||||
|
||||
/*! \file pkcs_1_v1_5_encode.c
|
||||
*
|
||||
* PKCS #1 v1.5 Padding (Andreas Lange)
|
||||
*/
|
||||
|
||||
#ifdef LTC_PKCS_1
|
||||
|
||||
/*! \brief PKCS #1 v1.5 encode.
|
||||
*
|
||||
* \param msg The data to encode
|
||||
* \param msglen The length of the data to encode (octets)
|
||||
* \param block_type Block type to use in padding (\sa ltc_pkcs_1_v1_5_blocks)
|
||||
* \param modulus_bitlen The bit length of the RSA modulus
|
||||
* \param prng An active PRNG state (only for LTC_PKCS_1_EME)
|
||||
* \param prng_idx The index of the PRNG desired (only for LTC_PKCS_1_EME)
|
||||
* \param out [out] The destination for the encoded data
|
||||
* \param outlen [in/out] The max size and resulting size of the encoded data
|
||||
*
|
||||
* \return CRYPT_OK if successful
|
||||
*/
|
||||
int pkcs_1_v1_5_encode(const unsigned char *msg,
|
||||
unsigned long msglen,
|
||||
int block_type,
|
||||
unsigned long modulus_bitlen,
|
||||
prng_state *prng,
|
||||
int prng_idx,
|
||||
unsigned char *out,
|
||||
unsigned long *outlen)
|
||||
{
|
||||
unsigned long modulus_len, ps_len, i;
|
||||
unsigned char *ps;
|
||||
int result;
|
||||
|
||||
/* valid block_type? */
|
||||
if ((block_type != LTC_PKCS_1_EMSA) &&
|
||||
(block_type != LTC_PKCS_1_EME)) {
|
||||
return CRYPT_PK_INVALID_PADDING;
|
||||
}
|
||||
|
||||
if (block_type == LTC_PKCS_1_EME) { /* encryption padding, we need a valid PRNG */
|
||||
if ((result = prng_is_valid(prng_idx)) != CRYPT_OK) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
modulus_len = (modulus_bitlen >> 3) + (modulus_bitlen & 7 ? 1 : 0);
|
||||
|
||||
/* test message size */
|
||||
if ((msglen + 11) > modulus_len) {
|
||||
return CRYPT_PK_INVALID_SIZE;
|
||||
}
|
||||
|
||||
if (*outlen < modulus_len) {
|
||||
*outlen = modulus_len;
|
||||
result = CRYPT_BUFFER_OVERFLOW;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
/* generate an octets string PS */
|
||||
ps = &out[2];
|
||||
ps_len = modulus_len - msglen - 3;
|
||||
|
||||
if (block_type == LTC_PKCS_1_EME) {
|
||||
/* now choose a random ps */
|
||||
if (prng_descriptor[prng_idx].read(ps, ps_len, prng) != ps_len) {
|
||||
result = CRYPT_ERROR_READPRNG;
|
||||
goto bail;
|
||||
}
|
||||
|
||||
/* transform zero bytes (if any) to non-zero random bytes */
|
||||
for (i = 0; i < ps_len; i++) {
|
||||
while (ps[i] == 0) {
|
||||
if (prng_descriptor[prng_idx].read(&ps[i], 1, prng) != 1) {
|
||||
result = CRYPT_ERROR_READPRNG;
|
||||
goto bail;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
XMEMSET(ps, 0xFF, ps_len);
|
||||
}
|
||||
|
||||
/* create string of length modulus_len */
|
||||
out[0] = 0x00;
|
||||
out[1] = (unsigned char)block_type; /* block_type 1 or 2 */
|
||||
out[2 + ps_len] = 0x00;
|
||||
XMEMCPY(&out[2 + ps_len + 1], msg, msglen);
|
||||
*outlen = modulus_len;
|
||||
|
||||
result = CRYPT_OK;
|
||||
bail:
|
||||
return result;
|
||||
} /* pkcs_1_v1_5_encode */
|
||||
|
||||
#endif /* #ifdef LTC_PKCS_1 */
|
||||
|
||||
/* ref: HEAD -> master, tag: v1.18.2 */
|
||||
/* git commit: 7e7eb695d581782f04b24dc444cbfde86af59853 */
|
||||
/* commit time: 2018-07-01 22:49:01 +0200 */
|
Reference in New Issue
Block a user