| OLD | NEW |
| 1 | 1 |
| 2 @ ==================================================================== | 2 @ ==================================================================== |
| 3 @ Written by Andy Polyakov <appro@openssl.org> for the OpenSSL | 3 @ Written by Andy Polyakov <appro@openssl.org> for the OpenSSL |
| 4 @ project. The module is, however, dual licensed under OpenSSL and | 4 @ project. The module is, however, dual licensed under OpenSSL and |
| 5 @ CRYPTOGAMS licenses depending on where you obtain it. For further | 5 @ CRYPTOGAMS licenses depending on where you obtain it. For further |
| 6 @ details see http://www.openssl.org/~appro/cryptogams/. | 6 @ details see http://www.openssl.org/~appro/cryptogams/. |
| 7 @ | 7 @ |
| 8 @ Specific modes and adaptation for Linux kernel by Ard Biesheuvel | 8 @ Specific modes and adaptation for Linux kernel by Ard Biesheuvel |
| 9 @ <ard.biesheuvel@linaro.org>. Permission to use under GPL terms is | 9 @ <ard.biesheuvel@linaro.org>. Permission to use under GPL terms is |
| 10 @ granted. | 10 @ granted. |
| (...skipping 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 bne .Lkey_loop | 1046 bne .Lkey_loop |
| 1047 | 1047 |
| 1048 vmov.i8 q7,#0x63 @ compose .L63 | 1048 vmov.i8 q7,#0x63 @ compose .L63 |
| 1049 @ don't save last round key | 1049 @ don't save last round key |
| 1050 bx lr | 1050 bx lr |
| 1051 .size _bsaes_key_convert,.-_bsaes_key_convert | 1051 .size _bsaes_key_convert,.-_bsaes_key_convert |
| 1052 .extern AES_cbc_encrypt | 1052 .extern AES_cbc_encrypt |
| 1053 .extern AES_decrypt | 1053 .extern AES_decrypt |
| 1054 | 1054 |
| 1055 .global bsaes_cbc_encrypt | 1055 .global bsaes_cbc_encrypt |
| 1056 .hidden bsaes_cbc_encrypt |
| 1056 .type bsaes_cbc_encrypt,%function | 1057 .type bsaes_cbc_encrypt,%function |
| 1057 .align 5 | 1058 .align 5 |
| 1058 bsaes_cbc_encrypt: | 1059 bsaes_cbc_encrypt: |
| 1059 #ifndef __KERNEL__ | 1060 #ifndef __KERNEL__ |
| 1060 cmp r2, #128 | 1061 cmp r2, #128 |
| 1061 #ifndef __thumb__ | 1062 #ifndef __thumb__ |
| 1062 blo AES_cbc_encrypt | 1063 blo AES_cbc_encrypt |
| 1063 #else | 1064 #else |
| 1064 bhs 1f | 1065 bhs 1f |
| 1065 b AES_cbc_encrypt | 1066 b AES_cbc_encrypt |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1313 #endif | 1314 #endif |
| 1314 | 1315 |
| 1315 mov sp, r9 | 1316 mov sp, r9 |
| 1316 add sp, #0x10 @ add sp,r9,#0x10 is no good for
thumb | 1317 add sp, #0x10 @ add sp,r9,#0x10 is no good for
thumb |
| 1317 vst1.8 {q15}, [r8] @ return IV | 1318 vst1.8 {q15}, [r8] @ return IV |
| 1318 VFP_ABI_POP | 1319 VFP_ABI_POP |
| 1319 ldmia sp!, {r4-r10, pc} | 1320 ldmia sp!, {r4-r10, pc} |
| 1320 .size bsaes_cbc_encrypt,.-bsaes_cbc_encrypt | 1321 .size bsaes_cbc_encrypt,.-bsaes_cbc_encrypt |
| 1321 .extern AES_encrypt | 1322 .extern AES_encrypt |
| 1322 .global bsaes_ctr32_encrypt_blocks | 1323 .global bsaes_ctr32_encrypt_blocks |
| 1324 .hidden bsaes_ctr32_encrypt_blocks |
| 1323 .type bsaes_ctr32_encrypt_blocks,%function | 1325 .type bsaes_ctr32_encrypt_blocks,%function |
| 1324 .align 5 | 1326 .align 5 |
| 1325 bsaes_ctr32_encrypt_blocks: | 1327 bsaes_ctr32_encrypt_blocks: |
| 1326 cmp r2, #8 @ use plain AES for | 1328 cmp r2, #8 @ use plain AES for |
| 1327 blo .Lctr_enc_short @ small sizes | 1329 blo .Lctr_enc_short @ small sizes |
| 1328 | 1330 |
| 1329 mov ip, sp | 1331 mov ip, sp |
| 1330 stmdb sp!, {r4-r10, lr} | 1332 stmdb sp!, {r4-r10, lr} |
| 1331 VFP_ABI_PUSH | 1333 VFP_ABI_PUSH |
| 1332 ldr r8, [ip] @ ctr is 1st arg on the stack | 1334 ldr r8, [ip] @ ctr is 1st arg on the stack |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1530 subs r6, r6, #1 | 1532 subs r6, r6, #1 |
| 1531 bne .Lctr_enc_short_loop | 1533 bne .Lctr_enc_short_loop |
| 1532 | 1534 |
| 1533 vmov.i32 q0, #0 | 1535 vmov.i32 q0, #0 |
| 1534 vmov.i32 q1, #0 | 1536 vmov.i32 q1, #0 |
| 1535 vstmia sp!, {q0-q1} | 1537 vstmia sp!, {q0-q1} |
| 1536 | 1538 |
| 1537 ldmia sp!, {r4-r8, pc} | 1539 ldmia sp!, {r4-r8, pc} |
| 1538 .size bsaes_ctr32_encrypt_blocks,.-bsaes_ctr32_encrypt_blocks | 1540 .size bsaes_ctr32_encrypt_blocks,.-bsaes_ctr32_encrypt_blocks |
| 1539 .globl bsaes_xts_encrypt | 1541 .globl bsaes_xts_encrypt |
| 1542 .hidden bsaes_xts_encrypt |
| 1540 .type bsaes_xts_encrypt,%function | 1543 .type bsaes_xts_encrypt,%function |
| 1541 .align 4 | 1544 .align 4 |
| 1542 bsaes_xts_encrypt: | 1545 bsaes_xts_encrypt: |
| 1543 mov ip, sp | 1546 mov ip, sp |
| 1544 stmdb sp!, {r4-r10, lr} @ 0x20 | 1547 stmdb sp!, {r4-r10, lr} @ 0x20 |
| 1545 VFP_ABI_PUSH | 1548 VFP_ABI_PUSH |
| 1546 mov r6, sp @ future r3 | 1549 mov r6, sp @ future r3 |
| 1547 | 1550 |
| 1548 mov r7, r0 | 1551 mov r7, r0 |
| 1549 mov r8, r1 | 1552 mov r8, r1 |
| (...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2020 mov sp, r3 | 2023 mov sp, r3 |
| 2021 #ifdef XTS_CHAIN_TWEAK | 2024 #ifdef XTS_CHAIN_TWEAK |
| 2022 vst1.8 {q8}, [r1] | 2025 vst1.8 {q8}, [r1] |
| 2023 #endif | 2026 #endif |
| 2024 VFP_ABI_POP | 2027 VFP_ABI_POP |
| 2025 ldmia sp!, {r4-r10, pc} @ return | 2028 ldmia sp!, {r4-r10, pc} @ return |
| 2026 | 2029 |
| 2027 .size bsaes_xts_encrypt,.-bsaes_xts_encrypt | 2030 .size bsaes_xts_encrypt,.-bsaes_xts_encrypt |
| 2028 | 2031 |
| 2029 .globl bsaes_xts_decrypt | 2032 .globl bsaes_xts_decrypt |
| 2033 .hidden bsaes_xts_decrypt |
| 2030 .type bsaes_xts_decrypt,%function | 2034 .type bsaes_xts_decrypt,%function |
| 2031 .align 4 | 2035 .align 4 |
| 2032 bsaes_xts_decrypt: | 2036 bsaes_xts_decrypt: |
| 2033 mov ip, sp | 2037 mov ip, sp |
| 2034 stmdb sp!, {r4-r10, lr} @ 0x20 | 2038 stmdb sp!, {r4-r10, lr} @ 0x20 |
| 2035 VFP_ABI_PUSH | 2039 VFP_ABI_PUSH |
| 2036 mov r6, sp @ future r3 | 2040 mov r6, sp @ future r3 |
| 2037 | 2041 |
| 2038 mov r7, r0 | 2042 mov r7, r0 |
| 2039 mov r8, r1 | 2043 mov r8, r1 |
| (...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2537 mov sp, r3 | 2541 mov sp, r3 |
| 2538 #ifdef XTS_CHAIN_TWEAK | 2542 #ifdef XTS_CHAIN_TWEAK |
| 2539 vst1.8 {q8}, [r1] | 2543 vst1.8 {q8}, [r1] |
| 2540 #endif | 2544 #endif |
| 2541 VFP_ABI_POP | 2545 VFP_ABI_POP |
| 2542 ldmia sp!, {r4-r10, pc} @ return | 2546 ldmia sp!, {r4-r10, pc} @ return |
| 2543 | 2547 |
| 2544 .size bsaes_xts_decrypt,.-bsaes_xts_decrypt | 2548 .size bsaes_xts_decrypt,.-bsaes_xts_decrypt |
| 2545 #endif | 2549 #endif |
| 2546 #endif | 2550 #endif |
| OLD | NEW |