- Timestamp:
- 05/17/2019 10:57:19 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/sodium_compat/src/Core32/X25519.php
r44953 r45344 103 103 public static function fe_mul121666(ParagonIE_Sodium_Core32_Curve25519_Fe $f) 104 104 { 105 /** @var array<int, ParagonIE_Sodium_Core32_Int 32> $h */105 /** @var array<int, ParagonIE_Sodium_Core32_Int64> $h */ 106 106 $h = array(); 107 107 for ($i = 0; $i < 10; ++$i) { … … 109 109 } 110 110 111 /** @var ParagonIE_Sodium_Core32_Int32 $carry9 */112 111 $carry9 = $h[9]->addInt(1 << 24)->shiftRight(25); 113 112 $h[0] = $h[0]->addInt64($carry9->mulInt(19, 5)); 114 113 $h[9] = $h[9]->subInt64($carry9->shiftLeft(25)); 115 114 116 /** @var ParagonIE_Sodium_Core32_Int32 $carry1 */117 115 $carry1 = $h[1]->addInt(1 << 24)->shiftRight(25); 118 116 $h[2] = $h[2]->addInt64($carry1); 119 117 $h[1] = $h[1]->subInt64($carry1->shiftLeft(25)); 120 118 121 /** @var ParagonIE_Sodium_Core32_Int32 $carry3 */122 119 $carry3 = $h[3]->addInt(1 << 24)->shiftRight(25); 123 120 $h[4] = $h[4]->addInt64($carry3); 124 121 $h[3] = $h[3]->subInt64($carry3->shiftLeft(25)); 125 122 126 /** @var ParagonIE_Sodium_Core32_Int32 $carry5 */127 123 $carry5 = $h[5]->addInt(1 << 24)->shiftRight(25); 128 124 $h[6] = $h[6]->addInt64($carry5); 129 125 $h[5] = $h[5]->subInt64($carry5->shiftLeft(25)); 130 126 131 /** @var ParagonIE_Sodium_Core32_Int32 $carry7 */132 127 $carry7 = $h[7]->addInt(1 << 24)->shiftRight(25); 133 128 $h[8] = $h[8]->addInt64($carry7); 134 129 $h[7] = $h[7]->subInt64($carry7->shiftLeft(25)); 135 130 136 /** @var ParagonIE_Sodium_Core32_Int32 $carry0 */137 131 $carry0 = $h[0]->addInt(1 << 25)->shiftRight(26); 138 132 $h[1] = $h[1]->addInt64($carry0); 139 133 $h[0] = $h[0]->subInt64($carry0->shiftLeft(26)); 140 134 141 /** @var ParagonIE_Sodium_Core32_Int32 $carry2 */142 135 $carry2 = $h[2]->addInt(1 << 25)->shiftRight(26); 143 136 $h[3] = $h[3]->addInt64($carry2); 144 137 $h[2] = $h[2]->subInt64($carry2->shiftLeft(26)); 145 138 146 /** @var ParagonIE_Sodium_Core32_Int32 $carry4 */147 139 $carry4 = $h[4]->addInt(1 << 25)->shiftRight(26); 148 140 $h[5] = $h[5]->addInt64($carry4); 149 141 $h[4] = $h[4]->subInt64($carry4->shiftLeft(26)); 150 142 151 /** @var ParagonIE_Sodium_Core32_Int32 $carry6 */152 143 $carry6 = $h[6]->addInt(1 << 25)->shiftRight(26); 153 144 $h[7] = $h[7]->addInt64($carry6); 154 145 $h[6] = $h[6]->subInt64($carry6->shiftLeft(26)); 155 146 156 /** @var ParagonIE_Sodium_Core32_Int32 $carry8 */157 147 $carry8 = $h[8]->addInt(1 << 25)->shiftRight(26); 158 148 $h[9] = $h[9]->addInt64($carry8);
Note: See TracChangeset
for help on using the changeset viewer.