| OLD | NEW |
| 1 /* | 1 /* |
| 2 * aes_tables.c | 2 * aes_tables.c |
| 3 * | 3 * |
| 4 * generate tables for the AES cipher | 4 * generate tables for the AES cipher |
| 5 * | 5 * |
| 6 * David A. McGrew | 6 * David A. McGrew |
| 7 * Cisco Systems, Inc. | 7 * Cisco Systems, Inc. |
| 8 */ | 8 */ |
| 9 /* | 9 /* |
| 10 * | 10 * |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 35 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 36 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 36 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 37 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 37 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
| 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, |
| 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 40 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 40 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 41 * OF THE POSSIBILITY OF SUCH DAMAGE. | 41 * OF THE POSSIBILITY OF SUCH DAMAGE. |
| 42 * | 42 * |
| 43 */ | 43 */ |
| 44 | 44 |
| 45 #ifdef HAVE_CONFIG_H |
| 46 #include <config.h> |
| 47 #endif |
| 48 |
| 45 #include <stdio.h> | 49 #include <stdio.h> |
| 46 #include "gf2_8.h" | 50 #include "gf2_8.h" |
| 47 #include "crypto_math.h" | 51 #include "crypto_math.h" |
| 48 | 52 |
| 49 | 53 |
| 50 unsigned char aes_sbox[256]; | 54 unsigned char aes_sbox[256]; |
| 51 | 55 |
| 52 unsigned char aes_inv_sbox[256]; | 56 unsigned char aes_inv_sbox[256]; |
| 53 | 57 |
| 54 uint32_t T0[256], T1[256], T2[256], T3[256], T4[256]; | 58 uint32_t T0[256], T1[256], T2[256], T3[256], T4[256]; |
| (...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 /* compare to expected value then report */ | 341 /* compare to expected value then report */ |
| 338 v128_copy_octet_string(&y, plaintext); | 342 v128_copy_octet_string(&y, plaintext); |
| 339 | 343 |
| 340 if (v128_is_eq(&x, &y)) | 344 if (v128_is_eq(&x, &y)) |
| 341 return err_status_ok; | 345 return err_status_ok; |
| 342 return err_status_algo_fail; | 346 return err_status_algo_fail; |
| 343 | 347 |
| 344 } | 348 } |
| 345 | 349 |
| 346 #endif | 350 #endif |
| OLD | NEW |