Skip to content
Snippets Groups Projects
Select Git revision
  • c1b26acae295034e7aab2414ba50047cc889cafe
  • master default protected
  • android-7.1.2_r28_klist
  • oreo-mr1-iot-release
  • sdk-release
  • pie-cts-dev
  • pie-cts-release
  • pie-vts-release
  • nougat-iot-release
  • pie-gsi
  • pie-platform-release
  • pie-r2-release
  • pie-r2-s1-release
  • pie-release
  • pie-dev
  • oreo-m4-s4-release
  • o-mr1-iot-preview-8
  • oreo-m2-s2-release
  • oreo-m2-s1-release
  • oreo-m6-s2-release
  • oreo-m6-s3-release
  • android-o-mr1-iot-release-1.0.4
  • android-9.0.0_r8
  • android-9.0.0_r7
  • android-9.0.0_r6
  • android-9.0.0_r5
  • android-8.1.0_r46
  • android-8.1.0_r45
  • android-n-iot-release-smart-display-r2
  • android-vts-8.1_r5
  • android-cts-8.1_r8
  • android-cts-8.0_r12
  • android-cts-7.1_r20
  • android-cts-7.0_r24
  • android-cts-6.0_r31
  • android-o-mr1-iot-release-1.0.3
  • android-cts-9.0_r1
  • android-8.1.0_r43
  • android-8.1.0_r42
  • android-n-iot-release-smart-display
  • android-p-preview-5
41 results

iosched_policy.c

Blame
  • tcrypt.h 3.57 KiB
    /*
     * Quick & dirty crypto testing module.
     *
     * This will only exist until we have a better testing mechanism
     * (e.g. a char device).
     *
     * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
     * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
     * Copyright (c) 2007 Nokia Siemens Networks
     *
     * 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.
     *
     */
    #ifndef _CRYPTO_TCRYPT_H
    #define _CRYPTO_TCRYPT_H
    
    struct cipher_speed_template {
    	const char *key;
    	unsigned int klen;
    };
    
    struct hash_speed {
    	unsigned int blen;	/* buffer length */
    	unsigned int plen;	/* per-update length */
    	unsigned int klen;	/* key length */
    };
    
    /*
     * DES test vectors.
     */
    #define DES3_SPEED_VECTORS	1
    
    static struct cipher_speed_template des3_speed_template[] = {
    	{
    		.key	= "\x01\x23\x45\x67\x89\xab\xcd\xef"
    			  "\x55\x55\x55\x55\x55\x55\x55\x55"
    			  "\xfe\xdc\xba\x98\x76\x54\x32\x10",
    		.klen	= 24,
    	}
    };
    
    /*
     * Cipher speed tests
     */
    static u8 speed_template_8[] = {8, 0};
    static u8 speed_template_24[] = {24, 0};
    static u8 speed_template_8_16[] = {8, 16, 0};
    static u8 speed_template_8_32[] = {8, 32, 0};
    static u8 speed_template_16_32[] = {16, 32, 0};
    static u8 speed_template_16_24_32[] = {16, 24, 32, 0};
    static u8 speed_template_20_28_36[] = {20, 28, 36, 0};
    static u8 speed_template_32_40_48[] = {32, 40, 48, 0};
    static u8 speed_template_32_48[] = {32, 48, 0};
    static u8 speed_template_32_48_64[] = {32, 48, 64, 0};
    static u8 speed_template_32_64[] = {32, 64, 0};
    
    /*
     * Digest speed tests
     */
    static struct hash_speed generic_hash_speed_template[] = {
    	{ .blen = 16,	.plen = 16, },
    	{ .blen = 64,	.plen = 16, },
    	{ .blen = 64,	.plen = 64, },
    	{ .blen = 256,	.plen = 16, },
    	{ .blen = 256,	.plen = 64, },
    	{ .blen = 256,	.plen = 256, },
    	{ .blen = 1024,	.plen = 16, },