1295016Sjkim/* crypto/seed/seed_ecb.c */ 2183234Ssimon/* ==================================================================== 3183234Ssimon * Copyright (c) 2007 The OpenSSL Project. All rights reserved. 4183234Ssimon * 5183234Ssimon * Redistribution and use in source and binary forms, with or without 6183234Ssimon * modification, are permitted provided that the following conditions 7183234Ssimon * are met: 8183234Ssimon * 9183234Ssimon * 1. Redistributions of source code must retain the above copyright 10280304Sjkim * notice, this list of conditions and the following disclaimer. 11183234Ssimon * 12183234Ssimon * 2. Redistributions in binary form must reproduce the above copyright 13183234Ssimon * notice, this list of conditions and the following disclaimer in 14183234Ssimon * the documentation and/or other materials provided with the 15183234Ssimon * distribution. 16183234Ssimon * 17183234Ssimon * 3. All advertising materials mentioning features or use of this 18183234Ssimon * software must display the following acknowledgment: 19183234Ssimon * "This product includes software developed by the OpenSSL Project 20183234Ssimon * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 21183234Ssimon * 22183234Ssimon * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 23183234Ssimon * endorse or promote products derived from this software without 24183234Ssimon * prior written permission. For written permission, please contact 25183234Ssimon * openssl-core@openssl.org. 26183234Ssimon * 27183234Ssimon * 5. Products derived from this software may not be called "OpenSSL" 28183234Ssimon * nor may "OpenSSL" appear in their names without prior written 29183234Ssimon * permission of the OpenSSL Project. 30183234Ssimon * 31183234Ssimon * 6. Redistributions of any form whatsoever must retain the following 32183234Ssimon * acknowledgment: 33183234Ssimon * "This product includes software developed by the OpenSSL Project 34183234Ssimon * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 35183234Ssimon * 36183234Ssimon * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 37183234Ssimon * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 38183234Ssimon * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 39183234Ssimon * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 40183234Ssimon * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 41183234Ssimon * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 42183234Ssimon * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 43183234Ssimon * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 44183234Ssimon * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 45183234Ssimon * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 46183234Ssimon * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 47183234Ssimon * OF THE POSSIBILITY OF SUCH DAMAGE. 48183234Ssimon * ==================================================================== 49183234Ssimon * 50183234Ssimon */ 51183234Ssimon 52183234Ssimon#include <openssl/seed.h> 53183234Ssimon 54280304Sjkimvoid SEED_ecb_encrypt(const unsigned char *in, unsigned char *out, 55280304Sjkim const SEED_KEY_SCHEDULE *ks, int enc) 56280304Sjkim{ 57280304Sjkim if (enc) 58280304Sjkim SEED_encrypt(in, out, ks); 59280304Sjkim else 60280304Sjkim SEED_decrypt(in, out, ks); 61280304Sjkim} 62