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