Research Article

Secure Data Encryption for Cloud-Based Human Care Services

Algorithm 1

Adaptive encryption based on Simeck.
Require: Plaintext Blocks Round keys RK, The Number of Plaintext Blocks blkNum, Encryption Type t
Ensure: Ciphertext Blocks
1: if t == 1 then
2:     let n1 =blkNum/64; and r1 =blkNum %64;
3:     let n2 =r1/48; and r2 =r1%48;
4:     let n3 =r2/32; and r3 =r2%32;
5:     let n4 =r3/16; and r4 =r3%16;
6:     if r4 ≥1 then
7:      n4 ++;
8:      Pad ();
9:     fori from 1 to n1do
10:      Simeck 32/64 Enc SIMD 64Blks
11:     fori from 1 to n2do
12:      Simeck 32/64 Enc SIMD 48Blks
13:     fori from 1 to n3do
14:      Simeck 32/64 Enc SIMD 32Blks
15:     fori from 1 to n4do
16:      Simeck 32/64 Enc SIMD 16Blks
17: else
18:     let n1 =blkNum/32; and r1 =blkNum %32;
19:     let n2 =r1/24; and r2 =r1%24;
20:     let n3 =r2/16; and r3 =r2%16;
21:     let n4 =r3/8; and r4 =r3%8;
22:     if r4 ≥1 then
23:      n4 ++;
24:      Pad ();
25:     for i from 1 to n1do
26:      Simeck 64/128 Enc SIMD 32Blks
27:     fori from 1 to n2do
28:      Simeck 64/128 Enc SIMD 24Blks
29:     fori from 1 to n3do
30:      Simeck 64/128 Enc SIMD 16Blks
31:     fori from 1 to n4do
32:      Simeck 64/128 Enc SIMD 8Blks
33     Return C