=============================================================================== 001090dc : /* Add bytes into the hash */ void SHA256_Update(SHA256_CTX * ctx, const void *in, size_t len) { 1090dc: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 1090e0: 4605 mov r5, r0 uint64_t bitlen; uint32_t r; const unsigned char *src = in; /* Number of bytes left in the buffer from previous updates */ r = (ctx->count >> 3) & 0x3f; 1090e2: e9d0 7008 ldrd r7, r0, [r0, #32] /* Convert the length into a number of bits */ bitlen = len << 3; 1090e6: 00d3 lsls r3, r2, #3 /* Update number of bits */ ctx->count += bitlen; 1090e8: 19db adds r3, r3, r7 r = (ctx->count >> 3) & 0x3f; 1090ea: f3c7 07c5 ubfx r7, r7, #3, #6 ctx->count += bitlen; 1090ee: 622b str r3, [r5, #32] /* Handle the case where we don't need to perform any transforms */ if (len < 64 - r) { 1090f0: f1c7 0340 rsb r3, r7, #64 ; 0x40 ctx->count += bitlen; 1090f4: f140 0000 adc.w r0, r0, #0 if (len < 64 - r) { 1090f8: 4293 cmp r3, r2 ctx->count += bitlen; 1090fa: 6268 str r0, [r5, #36] ; 0x24 memcpy(&ctx->buf[r], src, len); 1090fc: f107 0028 add.w r0, r7, #40 ; 0x28 109100: 4428 add r0, r5 if (len < 64 - r) { 109102: d821 bhi.n 109148 109104: 4616 mov r6, r2 109106: 460c mov r4, r1 return; } /* Finish the current block */ memcpy(&ctx->buf[r], src, 64 - r); 109108: 461a mov r2, r3 SHA256_Transform(ctx->state, ctx->buf); 10910a: f105 0828 add.w r8, r5, #40 ; 0x28 10910e: 3e40 subs r6, #64 ; 0x40 src += 64 - r; 109110: 441c add r4, r3 len -= 64 - r; 109112: 4437 add r7, r6 memcpy(&ctx->buf[r], src, 64 - r); 109114: f00b ea94 blx 114640 SHA256_Transform(ctx->state, ctx->buf); 109118: 4641 mov r1, r8 10911a: 4628 mov r0, r5 10911c: f7fe fe1e bl 107d5c /* Perform complete blocks */ while (len >= 64) { 109120: 2f3f cmp r7, #63 ; 0x3f 109122: d915 bls.n 109150 109124: f1a7 0640 sub.w r6, r7, #64 ; 0x40 109128: f026 063f bic.w r6, r6, #63 ; 0x3f 10912c: 3640 adds r6, #64 ; 0x40 10912e: 4426 add r6, r4 SHA256_Transform(ctx->state, src); 109130: 4621 mov r1, r4 109132: 4628 mov r0, r5 src += 64; 109134: 3440 adds r4, #64 ; 0x40 SHA256_Transform(ctx->state, src); 109136: f7fe fe11 bl 107d5c while (len >= 64) { 10913a: 42b4 cmp r4, r6 10913c: d1f8 bne.n 109130 <== ALWAYS TAKEN len -= 64; 10913e: f007 073f and.w r7, r7, #63 ; 0x3f } /* Copy left over data into buffer */ memcpy(ctx->buf, src, len); 109142: 463a mov r2, r7 109144: 4631 mov r1, r6 109146: 4640 mov r0, r8 } 109148: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} memcpy(ctx->buf, src, len); 10914c: f00f bf34 b.w 118fb8 <__memcpy_from_thumb> src += 64 - r; 109150: 4626 mov r6, r4 109152: e7f6 b.n 109142 =============================================================================== 0010ec80 : /* Zero bits processed so far */ ctx->count[0] = ctx->count[1] = 0; /* Magic initialization constants */ ctx->state[0] = 0x6a09e667f3bcc908ULL; 10ec80: a31b add r3, pc, #108 ; (adr r3, 10ecf0 ) 10ec82: e9d3 2300 ldrd r2, r3, [r3] ctx->count[0] = ctx->count[1] = 0; 10ec86: efc0 0010 vmov.i32 d16, #0 ; 0x00000000 ctx->state[1] = 0xbb67ae8584caa73bULL; 10ec8a: eddf 1b13 vldr d17, [pc, #76] ; 10ecd8 ctx->state[0] = 0x6a09e667f3bcc908ULL; 10ec8e: e9c0 2300 strd r2, r3, [r0] ctx->state[2] = 0x3c6ef372fe94f82bULL; 10ec92: a319 add r3, pc, #100 ; (adr r3, 10ecf8 ) 10ec94: e9d3 2300 ldrd r2, r3, [r3] ctx->count[0] = ctx->count[1] = 0; 10ec98: edc0 0b12 vstr d16, [r0, #72] ; 0x48 10ec9c: edc0 0b10 vstr d16, [r0, #64] ; 0x40 ctx->state[2] = 0x3c6ef372fe94f82bULL; 10eca0: e9c0 2304 strd r2, r3, [r0, #16] ctx->state[3] = 0xa54ff53a5f1d36f1ULL; ctx->state[4] = 0x510e527fade682d1ULL; 10eca4: a316 add r3, pc, #88 ; (adr r3, 10ed00 ) 10eca6: e9d3 2300 ldrd r2, r3, [r3] ctx->state[3] = 0xa54ff53a5f1d36f1ULL; 10ecaa: eddf 0b0d vldr d16, [pc, #52] ; 10ece0 ctx->state[1] = 0xbb67ae8584caa73bULL; 10ecae: edc0 1b02 vstr d17, [r0, #8] ctx->state[4] = 0x510e527fade682d1ULL; 10ecb2: e9c0 2308 strd r2, r3, [r0, #32] ctx->state[5] = 0x9b05688c2b3e6c1fULL; ctx->state[6] = 0x1f83d9abfb41bd6bULL; 10ecb6: a314 add r3, pc, #80 ; (adr r3, 10ed08 ) 10ecb8: e9d3 2300 ldrd r2, r3, [r3] ctx->state[3] = 0xa54ff53a5f1d36f1ULL; 10ecbc: edc0 0b06 vstr d16, [r0, #24] ctx->state[5] = 0x9b05688c2b3e6c1fULL; 10ecc0: eddf 0b09 vldr d16, [pc, #36] ; 10ece8 ctx->state[6] = 0x1f83d9abfb41bd6bULL; 10ecc4: e9c0 230c strd r2, r3, [r0, #48] ; 0x30 ctx->state[7] = 0x5be0cd19137e2179ULL; 10ecc8: a311 add r3, pc, #68 ; (adr r3, 10ed10 ) 10ecca: e9d3 2300 ldrd r2, r3, [r3] ctx->state[5] = 0x9b05688c2b3e6c1fULL; 10ecce: edc0 0b0a vstr d16, [r0, #40] ; 0x28 ctx->state[7] = 0x5be0cd19137e2179ULL; 10ecd2: e9c0 230e strd r2, r3, [r0, #56] ; 0x38 } 10ecd6: 4770 bx lr 10ecd8: 84caa73b .word 0x84caa73b 10ecdc: bb67ae85 .word 0xbb67ae85 10ece0: 5f1d36f1 .word 0x5f1d36f1 10ece4: a54ff53a .word 0xa54ff53a 10ece8: 2b3e6c1f .word 0x2b3e6c1f 10ecec: 9b05688c .word 0x9b05688c 10ecf0: f3bcc908 .word 0xf3bcc908 10ecf4: 6a09e667 .word 0x6a09e667 10ecf8: fe94f82b .word 0xfe94f82b 10ecfc: 3c6ef372 .word 0x3c6ef372 10ed00: ade682d1 .word 0xade682d1 10ed04: 510e527f .word 0x510e527f 10ed08: fb41bd6b .word 0xfb41bd6b 10ed0c: 1f83d9ab .word 0x1f83d9ab 10ed10: 137e2179 .word 0x137e2179 10ed14: 5be0cd19 .word 0x5be0cd19 =============================================================================== 0010ed18 : /* Add bytes into the hash */ void SHA512_Update(SHA512_CTX * ctx, const void *in, size_t len) { 10ed18: e92d 41f0 stmdb sp!, {r4, r5, r6, r7, r8, lr} 10ed1c: 4690 mov r8, r2 uint64_t bitlen[2]; uint64_t r; const unsigned char *src = in; /* Number of bytes left in the buffer from previous updates */ r = (ctx->count[1] >> 3) & 0x7f; 10ed1e: e9d0 3212 ldrd r3, r2, [r0, #72] ; 0x48 /* Convert the length into a number of bits */ bitlen[1] = ((uint64_t)len) << 3; 10ed22: ea4f 07c8 mov.w r7, r8, lsl #3 { 10ed26: 4605 mov r5, r0 bitlen[1] = ((uint64_t)len) << 3; 10ed28: ea4f 7058 mov.w r0, r8, lsr #29 r = (ctx->count[1] >> 3) & 0x7f; 10ed2c: 2400 movs r4, #0 10ed2e: f3c3 06c6 ubfx r6, r3, #3, #7 bitlen[0] = ((uint64_t)len) >> 61; /* Update number of bits */ if ((ctx->count[1] += bitlen[1]) < bitlen[1]) 10ed32: 19db adds r3, r3, r7 10ed34: 4142 adcs r2, r0 10ed36: bf2c ite cs 10ed38: f04f 0c01 movcs.w ip, #1 10ed3c: 46a4 movcc ip, r4 10ed3e: e9c5 3212 strd r3, r2, [r5, #72] ; 0x48 10ed42: f1bc 0f00 cmp.w ip, #0 10ed46: d006 beq.n 10ed56 <== NEVER TAKEN ctx->count[0]++; 10ed48: 6c2b ldr r3, [r5, #64] ; 0x40 <== NOT EXECUTED 10ed4a: 3301 adds r3, #1 <== NOT EXECUTED 10ed4c: 642b str r3, [r5, #64] ; 0x40 <== NOT EXECUTED 10ed4e: 6c6b ldr r3, [r5, #68] ; 0x44 <== NOT EXECUTED 10ed50: f143 0300 adc.w r3, r3, #0 <== NOT EXECUTED 10ed54: 646b str r3, [r5, #68] ; 0x44 <== NOT EXECUTED ctx->count[0] += bitlen[0]; /* Handle the case where we don't need to perform any transforms */ if (len < 128 - r) { 10ed56: f1d6 0280 rsbs r2, r6, #128 ; 0x80 memcpy(&ctx->buf[r], src, len); 10ed5a: f106 0050 add.w r0, r6, #80 ; 0x50 if (len < 128 - r) { 10ed5e: eb63 0303 sbc.w r3, r3, r3 10ed62: 4590 cmp r8, r2 10ed64: eb74 0303 sbcs.w r3, r4, r3 memcpy(&ctx->buf[r], src, len); 10ed68: 4428 add r0, r5 if (len < 128 - r) { 10ed6a: d324 bcc.n 10edb6 return; } /* Finish the current block */ memcpy(&ctx->buf[r], src, 128 - r); SHA512_Transform(ctx->state, ctx->buf); 10ed6c: f105 0750 add.w r7, r5, #80 ; 0x50 10ed70: f1a8 0880 sub.w r8, r8, #128 ; 0x80 src += 128 - r; 10ed74: 188c adds r4, r1, r2 len -= 128 - r; 10ed76: 44b0 add r8, r6 memcpy(&ctx->buf[r], src, 128 - r); 10ed78: f005 ec62 blx 114640 SHA512_Transform(ctx->state, ctx->buf); 10ed7c: 4639 mov r1, r7 10ed7e: 4628 mov r0, r5 10ed80: f7fa fa60 bl 109244 /* Perform complete blocks */ while (len >= 128) { 10ed84: f1b8 0f7f cmp.w r8, #127 ; 0x7f 10ed88: d91a bls.n 10edc0 <== NEVER TAKEN 10ed8a: f1a8 0680 sub.w r6, r8, #128 ; 0x80 <== NOT EXECUTED 10ed8e: f026 067f bic.w r6, r6, #127 ; 0x7f <== NOT EXECUTED 10ed92: 3680 adds r6, #128 ; 0x80 <== NOT EXECUTED 10ed94: 4426 add r6, r4 <== NOT EXECUTED SHA512_Transform(ctx->state, src); 10ed96: 4621 mov r1, r4 <== NOT EXECUTED 10ed98: 4628 mov r0, r5 <== NOT EXECUTED src += 128; 10ed9a: 3480 adds r4, #128 ; 0x80 <== NOT EXECUTED SHA512_Transform(ctx->state, src); 10ed9c: f7fa fa52 bl 109244 <== NOT EXECUTED while (len >= 128) { 10eda0: 42b4 cmp r4, r6 <== NOT EXECUTED 10eda2: d1f8 bne.n 10ed96 <== NOT EXECUTED len -= 128; 10eda4: f008 087f and.w r8, r8, #127 ; 0x7f <== NOT EXECUTED } /* Copy left over data into buffer */ memcpy(ctx->buf, src, len); 10eda8: 4642 mov r2, r8 10edaa: 4631 mov r1, r6 10edac: 4638 mov r0, r7 } 10edae: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} memcpy(ctx->buf, src, len); 10edb2: f00a b901 b.w 118fb8 <__memcpy_from_thumb> memcpy(&ctx->buf[r], src, len); 10edb6: 4642 mov r2, r8 } 10edb8: e8bd 41f0 ldmia.w sp!, {r4, r5, r6, r7, r8, lr} memcpy(&ctx->buf[r], src, len); 10edbc: f00a b8fc b.w 118fb8 <__memcpy_from_thumb> src += 128 - r; 10edc0: 4626 mov r6, r4 10edc2: e7f1 b.n 10eda8