Skip to content
Snippets Groups Projects
Select Git revision
  • master
1 result

02-fundamentals.tex

Blame
  • Forked from Lehrstuhl für Informatik 4 (Systemsoftware) / TeX Vorlagen / Examensarbeit
    Source project has a limited visibility.
    gf128mul.c 13.18 KiB
    /* gf128mul.c - GF(2^128) multiplication functions
     *
     * Copyright (c) 2003, Dr Brian Gladman, Worcester, UK.
     * Copyright (c) 2006, Rik Snel <rsnel@cube.dyndns.org>
     *
     * Based on Dr Brian Gladman's (GPL'd) work published at
     * http://gladman.plushost.co.uk/oldsite/cryptography_technology/index.php
     * See the original copyright notice below.
     *
     * This program is free software; you can redistribute it and/or modify it
     * under the terms of the GNU General Public License as published by the Free
     * Software Foundation; either version 2 of the License, or (at your option)
     * any later version.
     */
    
    /*
     ---------------------------------------------------------------------------
     Copyright (c) 2003, Dr Brian Gladman, Worcester, UK.   All rights reserved.
    
     LICENSE TERMS
    
     The free distribution and use of this software in both source and binary
     form is allowed (with or without changes) provided that:
    
       1. distributions of this source code include the above copyright
          notice, this list of conditions and the following disclaimer;
    
       2. distributions in binary form include the above copyright
          notice, this list of conditions and the following disclaimer
          in the documentation and/or other associated materials;
    
       3. the copyright holder's name is not used to endorse products
          built using this software without specific written permission.
    
     ALTERNATIVELY, provided that this notice is retained in full, this product
     may be distributed under the terms of the GNU General Public License (GPL),
     in which case the provisions of the GPL apply INSTEAD OF those given above.
    
     DISCLAIMER
    
     This software is provided 'as is' with no explicit or implied warranties
     in respect of its properties, including, but not limited to, correctness
     and/or fitness for purpose.
     ---------------------------------------------------------------------------
     Issue 31/01/2006
    
     This file provides fast multiplication in GF(128) as required by several
     cryptographic authentication modes
    */
    
    #include <crypto/gf128mul.h>
    #include <linux/kernel.h>
    #include <linux/module.h>
    #include <linux/slab.h>
    
    #define gf128mul_dat(q) { \
    	q(0x00), q(0x01), q(0x02), q(0x03), q(0x04), q(0x05), q(0x06), q(0x07),\
    	q(0x08), q(0x09), q(0x0a), q(0x0b), q(0x0c), q(0x0d), q(0x0e), q(0x0f),\
    	q(0x10), q(0x11), q(0x12), q(0x13), q(0x14), q(0x15), q(0x16), q(0x17),\
    	q(0x18), q(0x19), q(0x1a), q(0x1b), q(0x1c), q(0x1d), q(0x1e), q(0x1f),\
    	q(0x20), q(0x21), q(0x22), q(0x23), q(0x24), q(0x25), q(0x26), q(0x27),\
    	q(0x28), q(0x29), q(0x2a), q(0x2b), q(0x2c), q(0x2d), q(0x2e), q(0x2f),\
    	q(0x30), q(0x31), q(0x32), q(0x33), q(0x34), q(0x35), q(0x36), q(0x37),\
    	q(0x38), q(0x39), q(0x3a), q(0x3b), q(0x3c), q(0x3d), q(0x3e), q(0x3f),\
    	q(0x40), q(0x41), q(0x42), q(0x43), q(0x44), q(0x45), q(0x46), q(0x47),\
    	q(0x48), q(0x49), q(0x4a), q(0x4b), q(0x4c), q(0x4d), q(0x4e), q(0x4f),\
    	q(0x50), q(0x51), q(0x52), q(0x53), q(0x54), q(0x55), q(0x56), q(0x57),\
    	q(0x58), q(0x59), q(0x5a), q(0x5b), q(0x5c), q(0x5d), q(0x5e), q(0x5f),\
    	q(0x60), q(0x61), q(0x62), q(0x63), q(0x64), q(0x65), q(0x66), q(0x67),\
    	q(0x68), q(0x69), q(0x6a), q(0x6b), q(0x6c), q(0x6d), q(0x6e), q(0x6f),\