andre@0: /* andre@0: * arcfive.c - stubs for RC5 - NOT a working implementation! andre@0: * andre@0: * This Source Code Form is subject to the terms of the Mozilla Public andre@0: * License, v. 2.0. If a copy of the MPL was not distributed with this andre@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ andre@0: andre@0: #ifdef FREEBL_NO_DEPEND andre@0: #include "stubs.h" andre@0: #endif andre@0: andre@0: #include "blapi.h" andre@0: #include "prerror.h" andre@0: andre@0: /******************************************/ andre@0: /* andre@0: ** RC5 symmetric block cypher -- 64-bit block size andre@0: */ andre@0: andre@0: /* andre@0: ** Create a new RC5 context suitable for RC5 encryption/decryption. andre@0: ** "key" raw key data andre@0: ** "len" the number of bytes of key data andre@0: ** "iv" is the CBC initialization vector (if mode is NSS_RC5_CBC) andre@0: ** "mode" one of NSS_RC5 or NSS_RC5_CBC andre@0: ** andre@0: ** When mode is set to NSS_RC5_CBC the RC5 cipher is run in "cipher block andre@0: ** chaining" mode. andre@0: */ andre@0: RC5Context * andre@0: RC5_CreateContext(const SECItem *key, unsigned int rounds, andre@0: unsigned int wordSize, const unsigned char *iv, int mode) andre@0: { andre@0: PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); andre@0: return NULL; andre@0: } andre@0: andre@0: /* andre@0: ** Destroy an RC5 encryption/decryption context. andre@0: ** "cx" the context andre@0: ** "freeit" if PR_TRUE then free the object as well as its sub-objects andre@0: */ andre@0: void andre@0: RC5_DestroyContext(RC5Context *cx, PRBool freeit) andre@0: { andre@0: PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); andre@0: } andre@0: andre@0: /* andre@0: ** Perform RC5 encryption. andre@0: ** "cx" the context andre@0: ** "output" the output buffer to store the encrypted data. andre@0: ** "outputLen" how much data is stored in "output". Set by the routine andre@0: ** after some data is stored in output. andre@0: ** "maxOutputLen" the maximum amount of data that can ever be andre@0: ** stored in "output" andre@0: ** "input" the input data andre@0: ** "inputLen" the amount of input data andre@0: */ andre@0: SECStatus andre@0: RC5_Encrypt(RC5Context *cx, unsigned char *output, unsigned int *outputLen, andre@0: unsigned int maxOutputLen, andre@0: const unsigned char *input, unsigned int inputLen) andre@0: { andre@0: PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); andre@0: return SECFailure; andre@0: } andre@0: andre@0: /* andre@0: ** Perform RC5 decryption. andre@0: ** "cx" the context andre@0: ** "output" the output buffer to store the decrypted data. andre@0: ** "outputLen" how much data is stored in "output". Set by the routine andre@0: ** after some data is stored in output. andre@0: ** "maxOutputLen" the maximum amount of data that can ever be andre@0: ** stored in "output" andre@0: ** "input" the input data andre@0: ** "inputLen" the amount of input data andre@0: */ andre@0: SECStatus andre@0: RC5_Decrypt(RC5Context *cx, unsigned char *output, unsigned int *outputLen, andre@0: unsigned int maxOutputLen, andre@0: const unsigned char *input, unsigned int inputLen) andre@0: { andre@0: PORT_SetError(PR_NOT_IMPLEMENTED_ERROR); andre@0: return SECFailure; andre@0: } andre@0: