Upgrade to Pro — share decks privately, control downloads, hide ads and more …

SHA256の実装を pythonで読むために

SHA256の実装を pythonで読むために

Yusuke Egami

March 17, 2018
Tweet

More Decks by Yusuke Egami

Other Decks in Technology

Transcript

  1. w = [0] * 64 w[0:16] = to_chunks(chunk, n=32) for

    i in range(16, 64): s0 = bin_xor(bin_rrot(w[i-15], 7), bin_rrot(w[i-15], 18), bin_rshift(w[i-15], 3)) s1 = bin_xor(bin_rrot(w[i-2], 17), bin_rrot(w[i-2], 19), bin_rshift(w[i-2], 10)) w[i] = bin_sum( w[i-16], s0, w[i-7], s1 ) IUUQTHJTUHJUIVCDPNOBOWFMFDCCDCCEEpMFTIBQZ-- ϥ΢ϯυ CZUFͷϒϩοΫΛCZUFʹ֦ுͯ͠ݸºCZUF Λੜ੒
  2. GPSJJOSBOHF    TVNCJO@TVN  X<J>  JOU@UP@MJTU @L<J>

     I  CJO@DI F G H  CJO@YPS CJO@SSPU F  CJO@SSPU F  CJO@SSPU F     TVNCJO@TVN  CJO@YPS CJO@SSPU B  CJO@SSPU B  CJO@SSPU B   CJO@NBK B C D  TVN   B C D E F G H ITVN B C D CJO@TVN E TVN <> F G H ॳظఆ਺