Skip to content

Commit 423884b

Browse files
committed
ci debug
1 parent f1a4d66 commit 423884b

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/build-test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
submodules: recursive
2828

2929
# Runs a set of commands using the runners shell
30-
#- name: build boost
31-
# run: python3 build.py --setup --boost --par=4
30+
# - name: build boost
31+
# run: python3 build.py --setup --boost --par=4
3232

3333
# - name: build relic
3434
# run: python3 build.py --setup --relic --par=4
@@ -37,7 +37,7 @@ jobs:
3737
# run: python3 build.py --setup --sodium --par=4
3838

3939
- name: build cryptoTools
40-
run: python3 build.py --par=4 #-DENABLE_RELIC=ON -D ENABLE_SODIUM=ON -DENABLE_CIRCUITS=ON
40+
run: python3 build.py --par=4 -DENABLE_RELIC=ON -D ENABLE_SODIUM=ON -DENABLE_CIRCUITS=ON
4141

4242
- name: unit tests
4343
run: ./out/build/linux/frontend_cryptoTools/frontend_cryptoTools -u

cryptoTools/Crypto/AES.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ namespace osuCrypto {
313313
}
314314

315315
template<AESTypes type>
316-
void AES<type>::ecbEncCounterMode(block baseIdx, u64 blockLength, block* ciphertext) const
316+
inline void AES<type>::ecbEncCounterMode(block baseIdx, u64 blockLength, block* ciphertext) const
317317
{
318318

319319
constexpr u64 step = 8;

cryptoTools/Crypto/PRNG.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,14 @@ namespace osuCrypto {
7070

7171
if (mBytesIdx == mBufferByteCapacity)
7272
{
73-
if (lengthu8 >= 8 * sizeof(block))
73+
while (lengthu8 >= 8 * sizeof(block))
7474
{
75-
span<block> b((block*)destu8, lengthu8 / sizeof(block));
75+
oc::AlignedArray<block, 8> b;
7676
mAes.ecbEncCounterMode(mBlockIdx, b.size(), b.data());
77+
memcpy(destu8, &b, sizeof(b));
7778
mBlockIdx += b.size();
7879

79-
step = b.size() * sizeof(block);
80+
step = sizeof(b);
8081

8182
destu8 += step;
8283
lengthu8 -= step;

0 commit comments

Comments
 (0)