2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FSecCrypto_SkipJackCore.h
19 * @brief This header file contains declarations of SkipJack Core encryption and decryption algorithms.
21 #ifndef _FSEC_CRYPTO_INTERNAL_SKIPJACKCORE_H_
22 #define _FSEC_CRYPTO_INTERNAL_SKIPJACKCORE_H_
24 static const int _SKIPJACK_BLOCK_DATA_SIZE = 8;
25 static const int _SKIPJACK_KEY_LENGTH = 10; // Key length is 10 bytes
28 namespace Tizen { namespace Security { namespace Crypto
34 byte iv[_SKIPJACK_BLOCK_DATA_SIZE];
35 byte keyVal[_SKIPJACK_KEY_LENGTH];
42 static void DoCipherCbc(const byte* pIn, byte* pOut, long length, SkipJackKey& ks, const byte* pIv, bool encFlag);
43 static void DoCipherEcb(const byte* pIn, byte* pOut, SkipJackKey& key, bool encFlag);
44 static void Encrypt(unsigned long* pData, SkipJackKey& key);
45 static void Decrypt(unsigned long* pData, SkipJackKey& key);
49 _SkipJackCore(const _SkipJackCore& rhs);
50 _SkipJackCore& operator =(const _SkipJackCore& rhs);
55 } } } //Tizen::Security::Crypto
57 #endif //_FSEC_CRYPTO_INTERNAL_SKIPJACKCORE_H_