pdb.h (261ea058f016bc04fa064348ad9bf39d94379381) | pdb.h (8c419778ab57e497b5de1352aa39dbe2efb3ed54) |
---|---|
1/* 2 * CAAM Protocol Data Block (PDB) definition header file 3 * | 1/* 2 * CAAM Protocol Data Block (PDB) definition header file 3 * |
4 * Copyright 2008-2012 Freescale Semiconductor, Inc. | 4 * Copyright 2008-2016 Freescale Semiconductor, Inc. |
5 * 6 */ 7 8#ifndef CAAM_PDB_H 9#define CAAM_PDB_H | 5 * 6 */ 7 8#ifndef CAAM_PDB_H 9#define CAAM_PDB_H |
10#include "compat.h" |
|
10 11/* 12 * PDB- IPSec ESP Header Modification Options 13 */ 14#define PDBHMO_ESP_DECAP_SHIFT 28 15#define PDBHMO_ESP_ENCAP_SHIFT 28 16/* 17 * Encap and Decap - Decrement TTL (Hop Limit) - Based on the value of the --- 453 unchanged lines hidden (view full) --- 471 u8 *w; /* or Wx,y */ 472 u8 *f; 473 u8 *c; 474 u8 *d; 475 u8 *tmp; /* temporary data block */ 476 u8 *ab; /* only used if ECC processing */ 477}; 478 | 11 12/* 13 * PDB- IPSec ESP Header Modification Options 14 */ 15#define PDBHMO_ESP_DECAP_SHIFT 28 16#define PDBHMO_ESP_ENCAP_SHIFT 28 17/* 18 * Encap and Decap - Decrement TTL (Hop Limit) - Based on the value of the --- 453 unchanged lines hidden (view full) --- 472 u8 *w; /* or Wx,y */ 473 u8 *f; 474 u8 *c; 475 u8 *d; 476 u8 *tmp; /* temporary data block */ 477 u8 *ab; /* only used if ECC processing */ 478}; 479 |
480/* RSA Protocol Data Block */ 481#define RSA_PDB_SGF_SHIFT 28 482#define RSA_PDB_E_SHIFT 12 483#define RSA_PDB_E_MASK (0xFFF << RSA_PDB_E_SHIFT) 484#define RSA_PDB_D_SHIFT 12 485#define RSA_PDB_D_MASK (0xFFF << RSA_PDB_D_SHIFT) 486 487#define RSA_PDB_SGF_F (0x8 << RSA_PDB_SGF_SHIFT) 488#define RSA_PDB_SGF_G (0x4 << RSA_PDB_SGF_SHIFT) 489#define RSA_PRIV_PDB_SGF_F (0x4 << RSA_PDB_SGF_SHIFT) 490#define RSA_PRIV_PDB_SGF_G (0x8 << RSA_PDB_SGF_SHIFT) 491 492#define RSA_PRIV_KEY_FRM_1 0 493 494/** 495 * RSA Encrypt Protocol Data Block 496 * @sgf: scatter-gather field 497 * @f_dma: dma address of input data 498 * @g_dma: dma address of encrypted output data 499 * @n_dma: dma address of RSA modulus 500 * @e_dma: dma address of RSA public exponent 501 * @f_len: length in octets of the input data 502 */ 503struct rsa_pub_pdb { 504 u32 sgf; 505 dma_addr_t f_dma; 506 dma_addr_t g_dma; 507 dma_addr_t n_dma; 508 dma_addr_t e_dma; 509 u32 f_len; 510} __packed; 511 512/** 513 * RSA Decrypt PDB - Private Key Form #1 514 * @sgf: scatter-gather field 515 * @g_dma: dma address of encrypted input data 516 * @f_dma: dma address of output data 517 * @n_dma: dma address of RSA modulus 518 * @d_dma: dma address of RSA private exponent 519 */ 520struct rsa_priv_f1_pdb { 521 u32 sgf; 522 dma_addr_t g_dma; 523 dma_addr_t f_dma; 524 dma_addr_t n_dma; 525 dma_addr_t d_dma; 526} __packed; 527 |
|
479#endif | 528#endif |