Sponsored Content
Full Discussion: AES encryption
Top Forums Programming AES encryption Post 302296189 by Neo on Tuesday 10th of March 2009 02:54:08 PM
Old 03-10-2009
Quote:
Originally Posted by Perderabo
Yeah but he wanted it in counter mode. That code is cipher block chaining mode. CBC is what almost everyone uses.

Block cipher modes of operation - Wikipedia, the free encyclopedia
Maybe he could search Koders for AES counter mode.....
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

encryption is possible??

NEED expertise help for this topic!!! Question 1: Is encryption possible for the shell scriping programing? shadow the scriping file, do think is impossible... Question2: built a simple program with the simplicity function that allow user change settings by enter corret name and... (3 Replies)
Discussion started by: trynew
3 Replies

2. UNIX for Advanced & Expert Users

encrypting file system using AES 256 bit

Experts, I am trying to encrypt my filesystem using the AES 256 bit type of encryption. I am using FreeBSD 5.4 and need to encrypt one of the mounted points. Does anybody have any good idea of how to do it? Is there any documentation about encrypting the disk partition as this method is more... (2 Replies)
Discussion started by: jimmynath
2 Replies

3. UNIX for Dummies Questions & Answers

File encryption/Key encryption ????

My dilemma, I need to send, deemed confidential, information via e-mail (SMTP). This information is sitting as a file on AIX. Typically I can send this data as a e-mail attachment via what we term a "mail filter" using telnet. I now would like to somehow encrypt the data and send it to a e-mail... (1 Reply)
Discussion started by: hugow
1 Replies

4. Programming

JAVA AES keylength exception

I am developing a JAVA application that must encrypt its data. On my development machine, I can use a 256 bit key with no problem. A test machine throws an exception complaining about an illegal key length. The test machine is using JRE 1.6u21. Does anyone know where I can get a version of the JRE... (1 Reply)
Discussion started by: ilikecows
1 Replies

5. Programming

3DES encryption

Hello everyone, can any one help me to find out the 3des(triple data encryption standard) algorithm implementation in C.. Thanks in advance (4 Replies)
Discussion started by: andrew.paul
4 Replies

6. Cybersecurity

File encryption tools with MAC address as an encryption key

Hi all, I'm looking for secure file encryption tools that use MAC address as encryption key. FYI, I'm using Red Hat Enterprise Linux OS. For example: when A wants to send file to B A will encrypt the file with B's computer MAC/IP address as an encryption key This file can only be decrypted... (2 Replies)
Discussion started by: sergionicosta
2 Replies

7. Cybersecurity

Is ccrypt AES 256 bit crypto secure enough?

Toucan software uses 256bit AES encryption using ccrypt (https://en.wikipedia.org/wiki/Ccrypt) i want to ask if its secure to use this ccrypt encryption for storing .TXT file with my passwords on cloud storage like Google Drive? (7 Replies)
Discussion started by: postcd
7 Replies

8. Programming

Publish and Subscribe to AES-256 Encrypted MQTT Messages to Node-RED from PHP Scripts

Various Node-Red crypto modules do not work with PHP, so to send an encrypted message from a PHP script (in this case from a Ubuntu server) to Node-RED we need our own code. After a few hours of searching, testing various libs, more testing and debugging, I got this PHP to Node-RED code... (0 Replies)
Discussion started by: Neo
0 Replies
aes(n)                                                  Advanced Encryption Standard (AES)                                                  aes(n)

__________________________________________________________________________________________________________________________________________________

NAME
aes - Implementation of the AES block cipher SYNOPSIS
package require Tcl 8.2 package require aes ?1.0.1? ::aes::aes ?-mode [ecb|cbc]? ?-dir [encrypt|decrypt]? -key keydata ?-iv vector? ?-hex? ?-out channel? ?-chunksize size? [ -in channel | data ] ::aes::Init mode keydata iv ::aes::Encrypt Key data ::aes::Decrypt Key data ::aes::Reset Key iv ::aes::Final Key _________________________________________________________________ DESCRIPTION
This is an implementation in Tcl of the Advanced Encryption Standard (AES) as published by the U.S. National Institute of Standards and Technology [1]. AES is a 128-bit block cipher with a variable key size of 128, 192 or 256 bits. This implementation supports ECB and CBC modes. COMMANDS
::aes::aes ?-mode [ecb|cbc]? ?-dir [encrypt|decrypt]? -key keydata ?-iv vector? ?-hex? ?-out channel? ?-chunksize size? [ -in channel | data ] Perform the aes algorithm on either the data provided by the argument or on the data read from the -in channel. If an -out channel is given then the result will be written to this channel. The -key option must be given. This parameter takes a binary string of either 16, 24 or 32 bytes in length and is used to generate the key schedule. The -mode and -dir options are optional and default to cbc mode and encrypt respectively. The initialization vector -iv takes a 16 byte binary argument which defaults to all zeros. See MODES OF OPERATION for more about available modes and their uses. AES is a 128-bit block cipher. This means that the data must be provided in units that are a multiple of 16 bytes. PROGRAMMING INTERFACE
Internal state is maintained in an opaque structure that is returned from the Init function. In ECB mode the state is not affected by the input but for CBC mode some input dependent state is maintained and may be reset by calling the Reset function with a new initialization vector value. ::aes::Init mode keydata iv Construct a new AES key schedule using the specified key data and the given initialization vector. The initialization vector is not used with ECB mode but is important for CBC mode. See MODES OF OPERATION for details about cipher modes. ::aes::Encrypt Key data Use a prepared key acquired by calling Init to encrypt the provided data. The data argument should be a binary array that is a mul- tiple of the AES block size of 16 bytes. The result is a binary array the same size as the input of encrypted data. ::aes::Decrypt Key data Decipher data using the key. Note that the same key may be used to encrypt and decrypt data provided that the initialization vector is reset appropriately for CBC mode. ::aes::Reset Key iv Reset the initialization vector. This permits the programmer to re-use a key and avoid the cost of re-generating the key schedule where the same key data is being used multiple times. ::aes::Final Key This should be called to clean up resources associated with Key. Once this function has been called the key may not be used again. MODES OF OPERATION
Electronic Code Book (ECB) ECB is the basic mode of all block ciphers. Each block is encrypted independently and so identical plain text will produce identical output when encrypted with the same key. Any encryption errors will only affect a single block however this is vulnerable to known plaintext attacks. Cipher Block Chaining (CBC) CBC mode uses the output of the last block encryption to affect the current block. An initialization vector of the same size as the cipher block size is used to handle the first block. The initialization vector should be chosen randomly and transmitted as the first block of the output. Errors in encryption affect the current block and the next block after which the cipher will correct itself. CBC is the most commonly used mode in software encryption. EXAMPLES
% set nil_block [string repeat \0 16] % aes::aes -hex -mode cbc -dir encrypt -key $nil_block $nil_block 66e94bd4ef8a2c3b884cfa59ca342b2e set Key [aes::Init cbc $sixteen_bytes_key_data $sixteen_byte_iv] append ciphertext [aes::Encrypt $Key $plaintext] append ciphertext [aes::Encrypt $Key $additional_plaintext] aes::Final $Key REFERENCES
[1] "Advanced Encryption Standard", Federal Information Processing Standards Publication 197, 2001 (http://csrc.nist.gov/publica- tions/fips/fips197/fips-197.pdf) AUTHORS
Thorsten Schloermann, Pat Thoyts BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category aes of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. SEE ALSO
blowfish(n), des(n), md5(n), sha1(n) KEYWORDS
aes, block cipher, data integrity, encryption, security COPYRIGHT
Copyright (c) 2005, Pat Thoyts <patthoyts@users.sourceforge.net> aes 1.0.1 aes(n)
All times are GMT -4. The time now is 01:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy