Problem in encrypting an audio file in matlab

1 view (last 30 days)
m encrypting an audio file in matlab successfully execute , but it is taking 16 values every time , as audio file has huge values when i divide audio file size with 16 it is giving me 689 .....means at every rotation it will return a cipher text n total cipher texts at the are 689 ...i m confused that how to embedd a bundle of cipher texts in any image...how much bits i need to embedd these cipher text .....or is there anyother way for encryption so that cipher text may decrease....??
my demo file
%AES_DEMO Demonstration of AES-components.
%
% AES_DEMO
% runs a demonstration of all components of
% the Advanced Encryption Standard (AES) toolbox. %
% In the initialization step the S-boxes, the round constants,
% and the polynomial matrices are created and
% an example cipher key is expanded into
% the round key schedule.
% Step two and three finally convert
% an example plaintext to ciphertext and back to plaintext.
% Copyright 2001-2005, J. J. Buchholz, Hochschule Bremen, buchholz@hs-bremen.de
% Version 1.0 30.05.2001
% Initialization [s_box, inv_s_box, w, poly_mat, inv_poly_mat] = aes_init;
% Define an arbitrary series of 16 plaintext bytes
% in hexadecimal (string) representation
% The following two specific plaintexts are used as examples
% in the AES-Specification (draft)
% plaintext_hex = {'00' '11' '22' '33' '44' '55' '66' '77' ...
% '88' '99' 'aa' 'bb' 'cc' 'dd' 'ee' 'ff'};
%plaintext_hex = {'32' '43' 'f6' 'a8' '88' '5a' '30' '8d' ...
% '31' '31' '98' 'a2' 'e0' '37' '07' '34'};
% % x = fopen('D:\MATLAB\AES\Aa.txt', 'r');
% %
% %
% a = a(1:16);
% size(a);
[plaintext1,fs]= wavread('A1.wav','native');
plaintext1=plaintext1(1:16);
plaintext_hex=dec2hex(plaintext1);
plaintext = hex2dec (plaintext_hex);
plain =[];
for i = 1:11025
plain[i]=plaintext1(1:16);
end size= length(plain);
% Convert plaintext from hexadecimal (string) to decimal representation
% This is the real McCoy.
% Convert the plaintext to ciphertext,
% using the expanded key, the S-box, and the polynomial transformation matrix
for i = 1:size
ciphertext = cipher (plain(i), w, s_box, poly_mat, 1);
end

Answers (0)

Categories

Find more on Simulation, Tuning, and Visualization in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!