Jet AES ECB and CBC modes

This commit is contained in:
Raymond Pasco 2016-05-24 12:02:06 -04:00
parent 4a9d61607f
commit af012bab8a
6 changed files with 1053 additions and 0 deletions

View File

@ -244,6 +244,8 @@ J_D_OFILES=\
jets/d/by_dif.o
J_E_OFILES=\
jets/e/aes_ecb.o \
jets/e/aes_cbc.o \
jets/e/aesc.o \
jets/e/cue.o \
jets/e/fl.o \

View File

@ -102,6 +102,20 @@
u3_noun u3qe_rexp(u3_noun, u3_noun);
u3_noun u3qe_trip(u3_atom);
u3_noun u3qea_ecba_en(u3_atom, u3_atom);
u3_noun u3qea_ecba_de(u3_atom, u3_atom);
u3_noun u3qea_ecbb_en(u3_atom, u3_atom);
u3_noun u3qea_ecbb_de(u3_atom, u3_atom);
u3_noun u3qea_ecbc_en(u3_atom, u3_atom);
u3_noun u3qea_ecbc_de(u3_atom, u3_atom);
u3_noun u3qea_cbca_en(u3_atom, u3_atom, u3_atom);
u3_noun u3qea_cbca_de(u3_atom, u3_atom, u3_atom);
u3_noun u3qea_cbcb_en(u3_atom, u3_atom, u3_atom);
u3_noun u3qea_cbcb_de(u3_atom, u3_atom, u3_atom);
u3_noun u3qea_cbcc_en(u3_atom, u3_atom, u3_atom);
u3_noun u3qea_cbcc_de(u3_atom, u3_atom, u3_atom);
u3_noun u3qea_de(u3_atom, u3_atom);
u3_noun u3qea_en(u3_atom, u3_atom);

View File

@ -114,6 +114,20 @@
u3_noun u3we_pose(u3_noun);
u3_noun u3we_sfix(u3_noun);
u3_noun u3wea_ecba_en(u3_noun);
u3_noun u3wea_ecba_de(u3_noun);
u3_noun u3wea_ecbb_en(u3_noun);
u3_noun u3wea_ecbb_de(u3_noun);
u3_noun u3wea_ecbc_en(u3_noun);
u3_noun u3wea_ecbc_de(u3_noun);
u3_noun u3wea_cbca_en(u3_noun);
u3_noun u3wea_cbca_de(u3_noun);
u3_noun u3wea_cbcb_en(u3_noun);
u3_noun u3wea_cbcb_de(u3_noun);
u3_noun u3wea_cbcc_en(u3_noun);
u3_noun u3wea_cbcc_de(u3_noun);
u3_noun u3wea_de(u3_noun);
u3_noun u3wea_en(u3_noun);

548
jets/e/aes_cbc.c Normal file
View File

@ -0,0 +1,548 @@
/* j/5/aes_cbc.c
**
*/
#include "all.h"
#include <openssl/aes.h>
/* functions
*/
u3_noun
u3qea_cbca_en(u3_atom key,
u3_atom iv,
u3_atom msg)
{
c3_y key_y[16];
c3_y iv_y[16];
c3_w len_msg_w;
c3_w len_out_w;
c3_y *msg_y;
c3_y *out_y;
u3_atom out;
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 16);
c3_assert(u3r_met(3, iv) <= 16);
len_msg_w = u3r_met(3, msg);
len_out_w = (len_msg_w % 16) == 0 ? len_msg_w : len_msg_w + (16 - (len_msg_w % 16));
len_msg_w = len_out_w;
msg_y = u3a_malloc(len_msg_w);
out_y = u3a_malloc(len_out_w);
{
int i = 15;
do {
key_y[i] = u3r_byte(15-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
iv_y[i] = u3r_byte(15-i, iv);
i--;
} while (i >= 0);
}
{
int i = len_msg_w - 1;
do {
msg_y[i] = u3r_byte((len_msg_w - 1)-i, msg);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_encrypt_key(key_y, 128, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_cbc_encrypt(msg_y, out_y, len_msg_w, &key_u, iv_y, AES_ENCRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = len_out_w - 1;
int j = 0;
c3_y tmp;
do {
tmp = out_y[i];
out_y[i] = out_y[j];
out_y[j] = tmp;
i--; j++;
} while (i > j);
}
out = u3i_bytes(len_out_w, out_y);
u3a_free(msg_y);
u3a_free(out_y);
return out;
}
u3_noun
u3wea_cbca_en(u3_noun cor)
{
u3_noun a, b, c;
if ( c3n == u3r_mean(cor, u3x_sam, &c, 60, &a, 61, &b, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_cbca_en(a, b, c);
}
}
u3_noun
u3qea_cbca_de(u3_atom key,
u3_atom iv,
u3_atom msg)
{
c3_y key_y[16];
c3_y iv_y[16];
c3_w len_msg_w;
c3_w len_out_w;
c3_y *msg_y;
c3_y *out_y;
u3_atom out;
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 16);
c3_assert(u3r_met(3, iv) <= 16);
len_msg_w = u3r_met(3, msg);
len_out_w = (len_msg_w % 16) == 0 ? len_msg_w : len_msg_w + (16 - (len_msg_w % 16));
len_msg_w = len_out_w;
msg_y = u3a_malloc(len_msg_w);
out_y = u3a_malloc(len_out_w);
{
int i = 15;
do {
key_y[i] = u3r_byte(15-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
iv_y[i] = u3r_byte(15-i, iv);
i--;
} while (i >= 0);
}
{
int i = len_msg_w - 1;
do {
msg_y[i] = u3r_byte((len_msg_w - 1)-i, msg);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_decrypt_key(key_y, 128, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_cbc_encrypt(msg_y, out_y, len_msg_w, &key_u, iv_y, AES_DECRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = len_out_w - 1;
int j = 0;
c3_y tmp;
do {
tmp = out_y[i];
out_y[i] = out_y[j];
out_y[j] = tmp;
i--; j++;
} while (i > j);
}
out = u3i_bytes(len_out_w, out_y);
u3a_free(msg_y);
u3a_free(out_y);
return out;
}
u3_noun
u3wea_cbca_de(u3_noun cor)
{
u3_noun a, b, c;
if ( c3n == u3r_mean(cor, u3x_sam, &c, 60, &a, 61, &b, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_cbca_de(a, b, c);
}
}
u3_noun
u3qea_cbcb_en(u3_atom key,
u3_atom iv,
u3_atom msg)
{
c3_y key_y[24];
c3_y iv_y[16];
c3_w len_msg_w;
c3_w len_out_w;
c3_y *msg_y;
c3_y *out_y;
u3_atom out;
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 24);
c3_assert(u3r_met(3, iv) <= 16);
len_msg_w = u3r_met(3, msg);
len_out_w = (len_msg_w % 16) == 0 ? len_msg_w : len_msg_w + (16 - (len_msg_w % 16));
len_msg_w = len_out_w;
msg_y = u3a_malloc(len_msg_w);
out_y = u3a_malloc(len_out_w);
{
int i = 23;
do {
key_y[i] = u3r_byte(23-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
iv_y[i] = u3r_byte(15-i, iv);
i--;
} while (i >= 0);
}
{
int i = len_msg_w - 1;
do {
msg_y[i] = u3r_byte((len_msg_w - 1)-i, msg);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_encrypt_key(key_y, 192, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_cbc_encrypt(msg_y, out_y, len_msg_w, &key_u, iv_y, AES_ENCRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = len_out_w - 1;
int j = 0;
c3_y tmp;
do {
tmp = out_y[i];
out_y[i] = out_y[j];
out_y[j] = tmp;
i--; j++;
} while (i > j);
}
out = u3i_bytes(len_out_w, out_y);
u3a_free(msg_y);
u3a_free(out_y);
return out;
}
u3_noun
u3wea_cbcb_en(u3_noun cor)
{
u3_noun a, b, c;
if ( c3n == u3r_mean(cor, u3x_sam, &c, 60, &a, 61, &b, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_cbcb_en(a, b, c);
}
}
u3_noun
u3qea_cbcb_de(u3_atom key,
u3_atom iv,
u3_atom msg)
{
c3_y key_y[24];
c3_y iv_y[16];
c3_w len_msg_w;
c3_w len_out_w;
c3_y *msg_y;
c3_y *out_y;
u3_atom out;
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 24);
c3_assert(u3r_met(3, iv) <= 16);
len_msg_w = u3r_met(3, msg);
len_out_w = (len_msg_w % 16) == 0 ? len_msg_w : len_msg_w + (16 - (len_msg_w % 16));
len_msg_w = len_out_w;
msg_y = u3a_malloc(len_msg_w);
out_y = u3a_malloc(len_out_w);
{
int i = 23;
do {
key_y[i] = u3r_byte(23-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
iv_y[i] = u3r_byte(15-i, iv);
i--;
} while (i >= 0);
}
{
int i = len_msg_w - 1;
do {
msg_y[i] = u3r_byte((len_msg_w - 1)-i, msg);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_decrypt_key(key_y, 192, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_cbc_encrypt(msg_y, out_y, len_msg_w, &key_u, iv_y, AES_DECRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = len_out_w - 1;
int j = 0;
c3_y tmp;
do {
tmp = out_y[i];
out_y[i] = out_y[j];
out_y[j] = tmp;
i--; j++;
} while (i > j);
}
out = u3i_bytes(len_out_w, out_y);
u3a_free(msg_y);
u3a_free(out_y);
return out;
}
u3_noun
u3wea_cbcb_de(u3_noun cor)
{
u3_noun a, b, c;
if ( c3n == u3r_mean(cor, u3x_sam, &c, 60, &a, 61, &b, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_cbcb_de(a, b, c);
}
}
u3_noun
u3qea_cbcc_en(u3_atom key,
u3_atom iv,
u3_atom msg)
{
c3_y key_y[32];
c3_y iv_y[16];
c3_w len_msg_w;
c3_w len_out_w;
c3_y *msg_y;
c3_y *out_y;
u3_atom out;
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 32);
c3_assert(u3r_met(3, iv) <= 16);
len_msg_w = u3r_met(3, msg);
len_out_w = (len_msg_w % 16) == 0 ? len_msg_w : len_msg_w + (16 - (len_msg_w % 16));
len_msg_w = len_out_w;
msg_y = u3a_malloc(len_msg_w);
out_y = u3a_malloc(len_out_w);
{
int i = 31;
do {
key_y[i] = u3r_byte(31-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
iv_y[i] = u3r_byte(15-i, iv);
i--;
} while (i >= 0);
}
{
int i = len_msg_w - 1;
do {
msg_y[i] = u3r_byte((len_msg_w - 1)-i, msg);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_encrypt_key(key_y, 256, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_cbc_encrypt(msg_y, out_y, len_msg_w, &key_u, iv_y, AES_ENCRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = len_out_w - 1;
int j = 0;
c3_y tmp;
do {
tmp = out_y[i];
out_y[i] = out_y[j];
out_y[j] = tmp;
i--; j++;
} while (i > j);
}
out = u3i_bytes(len_out_w, out_y);
u3a_free(msg_y);
u3a_free(out_y);
return out;
}
u3_noun
u3wea_cbcc_en(u3_noun cor)
{
u3_noun a, b, c;
if ( c3n == u3r_mean(cor, u3x_sam, &c, 60, &a, 61, &b, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_cbcc_en(a, b, c);
}
}
u3_noun
u3qea_cbcc_de(u3_atom key,
u3_atom iv,
u3_atom msg)
{
c3_y key_y[32];
c3_y iv_y[16];
c3_w len_msg_w;
c3_w len_out_w;
c3_y *msg_y;
c3_y *out_y;
u3_atom out;
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 32);
c3_assert(u3r_met(3, iv) <= 16);
len_msg_w = u3r_met(3, msg);
len_out_w = (len_msg_w % 16) == 0 ? len_msg_w : len_msg_w + (16 - (len_msg_w % 16));
len_msg_w = len_out_w;
msg_y = u3a_malloc(len_msg_w);
out_y = u3a_malloc(len_out_w);
{
int i = 31;
do {
key_y[i] = u3r_byte(31-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
iv_y[i] = u3r_byte(15-i, iv);
i--;
} while (i >= 0);
}
{
int i = len_msg_w - 1;
do {
msg_y[i] = u3r_byte((len_msg_w - 1)-i, msg);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_decrypt_key(key_y, 256, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_cbc_encrypt(msg_y, out_y, len_msg_w, &key_u, iv_y, AES_DECRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = len_out_w - 1;
int j = 0;
c3_y tmp;
do {
tmp = out_y[i];
out_y[i] = out_y[j];
out_y[j] = tmp;
i--; j++;
} while (i > j);
}
out = u3i_bytes(len_out_w, out_y);
u3a_free(msg_y);
u3a_free(out_y);
return out;
}
u3_noun
u3wea_cbcc_de(u3_noun cor)
{
u3_noun a, b, c;
if ( c3n == u3r_mean(cor, u3x_sam, &c, 60, &a, 61, &b, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_cbcc_de(a, b, c);
}
}

407
jets/e/aes_ecb.c Normal file
View File

@ -0,0 +1,407 @@
/* j/5/aes_ecb.c
**
*/
#include "all.h"
#include <openssl/aes.h>
/* functions
*/
u3_noun
u3qea_ecba_en(u3_atom key,
u3_atom blk)
{
c3_y key_y[16];
c3_y blk_y[16];
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 16);
c3_assert(u3r_met(3, blk) <= 16);
{
int i = 15;
do {
key_y[i] = u3r_byte(15-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
blk_y[i] = u3r_byte(15-i, blk);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_encrypt_key(key_y, 128, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_ecb_encrypt(blk_y, blk_y, &key_u, AES_ENCRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = 15;
int j = 0;
c3_y tmp;
do {
tmp = blk_y[i];
blk_y[i] = blk_y[j];
blk_y[j] = tmp;
i--; j++;
} while (i > j);
}
return u3i_bytes(16, blk_y);
}
u3_noun
u3wea_ecba_en(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_ecba_en(a, b);
}
}
u3_noun
u3qea_ecba_de(u3_atom key,
u3_atom blk)
{
c3_y key_y[16];
c3_y blk_y[16];
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 16);
c3_assert(u3r_met(3, blk) <= 16);
{
int i = 15;
do {
key_y[i] = u3r_byte(15-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
blk_y[i] = u3r_byte(15-i, blk);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_decrypt_key(key_y, 128, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_ecb_encrypt(blk_y, blk_y, &key_u, AES_DECRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = 15;
int j = 0;
c3_y tmp;
do {
tmp = blk_y[i];
blk_y[i] = blk_y[j];
blk_y[j] = tmp;
i--; j++;
} while (i > j);
}
return u3i_bytes(16, blk_y);
}
u3_noun
u3wea_ecba_de(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_ecba_de(a, b);
}
}
u3_noun
u3qea_ecbb_en(u3_atom key,
u3_atom blk)
{
c3_y key_y[24];
c3_y blk_y[16];
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 24);
c3_assert(u3r_met(3, blk) <= 16);
{
int i = 23;
do {
key_y[i] = u3r_byte(23-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
blk_y[i] = u3r_byte(15-i, blk);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_encrypt_key(key_y, 192, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_ecb_encrypt(blk_y, blk_y, &key_u, AES_ENCRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = 15;
int j = 0;
c3_y tmp;
do {
tmp = blk_y[i];
blk_y[i] = blk_y[j];
blk_y[j] = tmp;
i--; j++;
} while (i > j);
}
return u3i_bytes(16, blk_y);
}
u3_noun
u3wea_ecbb_en(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_ecbb_en(a, b);
}
}
u3_noun
u3qea_ecbb_de(u3_atom key,
u3_atom blk)
{
c3_y key_y[24];
c3_y blk_y[16];
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 24);
c3_assert(u3r_met(3, blk) <= 16);
{
int i = 23;
do {
key_y[i] = u3r_byte(23-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
blk_y[i] = u3r_byte(15-i, blk);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_decrypt_key(key_y, 192, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_ecb_encrypt(blk_y, blk_y, &key_u, AES_DECRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = 15;
int j = 0;
c3_y tmp;
do {
tmp = blk_y[i];
blk_y[i] = blk_y[j];
blk_y[j] = tmp;
i--; j++;
} while (i > j);
}
return u3i_bytes(16, blk_y);
}
u3_noun
u3wea_ecbb_de(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_ecbb_de(a, b);
}
}
u3_noun
u3qea_ecbc_en(u3_atom key,
u3_atom blk)
{
c3_y key_y[32];
c3_y blk_y[16];
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 32);
c3_assert(u3r_met(3, blk) <= 16);
{
int i = 31;
do {
key_y[i] = u3r_byte(31-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
blk_y[i] = u3r_byte(15-i, blk);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_encrypt_key(key_y, 256, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_ecb_encrypt(blk_y, blk_y, &key_u, AES_ENCRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = 15;
int j = 0;
c3_y tmp;
do {
tmp = blk_y[i];
blk_y[i] = blk_y[j];
blk_y[j] = tmp;
i--; j++;
} while (i > j);
}
return u3i_bytes(16, blk_y);
}
u3_noun
u3wea_ecbc_en(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_ecbc_en(a, b);
}
}
u3_noun
u3qea_ecbc_de(u3_atom key,
u3_atom blk)
{
c3_y key_y[32];
c3_y blk_y[16];
AES_KEY key_u;
c3_assert(u3r_met(3, key) <= 32);
c3_assert(u3r_met(3, blk) <= 16);
{
int i = 31;
do {
key_y[i] = u3r_byte(31-i, key);
i--;
} while (i >= 0);
}
{
int i = 15;
do {
blk_y[i] = u3r_byte(15-i, blk);
i--;
} while (i >= 0);
}
if ( 0 != AES_set_decrypt_key(key_y, 256, &key_u) ) {
return u3m_bail(c3__exit);
}
else {
AES_ecb_encrypt(blk_y, blk_y, &key_u, AES_DECRYPT);
}
/* array reverse - we can write backwards u3i_bytes *
* in the unlikely event that this becomes a problem */
{
int i = 15;
int j = 0;
c3_y tmp;
do {
tmp = blk_y[i];
blk_y[i] = blk_y[j];
blk_y[j] = tmp;
i--; j++;
} while (i > j);
}
return u3i_bytes(16, blk_y);
}
u3_noun
u3wea_ecbc_de(u3_noun cor)
{
u3_noun a, b;
if ( c3n == u3r_mean(cor, u3x_sam, &b, u3x_con_sam, &a, 0) ||
c3n == u3ud(a) ||
c3n == u3ud(b) ) {
return u3m_bail(c3__exit);
} else {
return u3qea_ecbc_de(a, b);
}
}

View File

@ -412,8 +412,76 @@ static u3j_core _down_d[] =
{}
};
static u3j_harm _zuse__aes_ecba_en_a[] = {{".2", u3wea_ecba_en}, {}};
static u3j_harm _zuse__aes_ecba_de_a[] = {{".2", u3wea_ecba_de}, {}};
static u3j_harm _zuse__aes_ecbb_en_a[] = {{".2", u3wea_ecbb_en}, {}};
static u3j_harm _zuse__aes_ecbb_de_a[] = {{".2", u3wea_ecbb_de}, {}};
static u3j_harm _zuse__aes_ecbc_en_a[] = {{".2", u3wea_ecbc_en}, {}};
static u3j_harm _zuse__aes_ecbc_de_a[] = {{".2", u3wea_ecbc_de}, {}};
static u3j_harm _zuse__aes_cbca_en_a[] = {{".2", u3wea_cbca_en}, {}};
static u3j_harm _zuse__aes_cbca_de_a[] = {{".2", u3wea_cbca_de}, {}};
static u3j_harm _zuse__aes_cbcb_en_a[] = {{".2", u3wea_cbcb_en}, {}};
static u3j_harm _zuse__aes_cbcb_de_a[] = {{".2", u3wea_cbcb_de}, {}};
static u3j_harm _zuse__aes_cbcc_en_a[] = {{".2", u3wea_cbcc_en}, {}};
static u3j_harm _zuse__aes_cbcc_de_a[] = {{".2", u3wea_cbcc_de}, {}};
static u3j_core _zuse__aes_ecba_d[] =
{ { "en", _zuse__aes_ecba_en_a },
{ "de", _zuse__aes_ecba_de_a },
{}
};
static u3j_core _zuse__aes_ecbb_d[] =
{ { "en", _zuse__aes_ecbb_en_a },
{ "de", _zuse__aes_ecbb_de_a },
{}
};
static u3j_core _zuse__aes_ecbc_d[] =
{ { "en", _zuse__aes_ecbc_en_a },
{ "de", _zuse__aes_ecbc_de_a },
{}
};
static u3j_core _zuse__aes_cbca_d[] =
{ { "en", _zuse__aes_cbca_en_a },
{ "de", _zuse__aes_cbca_de_a },
{}
};
static u3j_core _zuse__aes_cbcb_d[] =
{ { "en", _zuse__aes_cbcb_en_a },
{ "de", _zuse__aes_cbcb_de_a },
{}
};
static u3j_core _zuse__aes_cbcc_d[] =
{ { "en", _zuse__aes_cbcc_en_a },
{ "de", _zuse__aes_cbcc_de_a },
{}
};
static u3j_core _zuse__aes_d[] =
{ { "ecba", 0, _zuse__aes_ecba_d },
{ "ecbb", 0, _zuse__aes_ecbb_d },
{ "ecbc", 0, _zuse__aes_ecbc_d },
{ "cbca", 0, _zuse__aes_cbca_d },
{ "cbcb", 0, _zuse__aes_cbcb_d },
{ "cbcc", 0, _zuse__aes_cbcc_d },
{}
};
/*
static u3j_core _zuse_d[] =
{ { "aes", 0, _zuse__aes_d },
{}
};
*/
static u3j_core _arvo_d[] =
{ { "down", 0, _down_d },
{ "aes", 0, _zuse__aes_d },
{}
};