1.软件版本

matlab2013b

2.本算法理论知识

算法的基本流程如下所示:

SubBytes

S-Box

ShiftRows

Mix Columns

AddRoundKey

3.核心代码

function varargout = main(varargin)
% MAIN MATLAB code for main.fig
%      MAIN, by itself, creates a new MAIN or raises the existing
%      singleton*.
%
%      H = MAIN returns the handle to a new MAIN or the handle to
%      the existing singleton*.
%
%      MAIN('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in MAIN.M with the given input arguments.
%
%      MAIN('Property','Value',...) creates a new MAIN or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before main_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to main_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to help main% Last Modified by GUIDE v2.5 28-May-2012 22:27:15% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...'gui_Singleton',  gui_Singleton, ...'gui_OpeningFcn', @main_OpeningFcn, ...'gui_OutputFcn',  @main_OutputFcn, ...'gui_LayoutFcn',  [] , ...'gui_Callback',   []);
if nargin && ischar(varargin{1})gui_State.gui_Callback = str2func(varargin{1});
endif nargout[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
elsegui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT% --- Executes just before main is made visible.
function main_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to main (see VARARGIN)% Choose default command line output for main
handles.output = hObject;% Update handles structure
guidata(hObject, handles);% UIWAIT makes main wait for user response (see UIRESUME)
% uiwait(handles.figure1);% --- Outputs from this function are returned to the command line.
function varargout = main_OutputFcn(hObject, eventdata, handles)
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)% Get default command line output from handles structure
varargout{1} = handles.output;% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global Image_RGB;[FileName,PathName] = uigetfile('*.*','选择图像');
FullPathName        = [PathName,'\',FileName];
Image_RGB           = rgb2gray(imread(FullPathName));
Image_RGB           = imresize(Image_RGB,[128,128]);
axes(handles.axes1);
imshow(Image_RGB);
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global Image_RGB;
global SBOX;
global invSBOX;
global w;
global polys;
global invpolys;
global images_AES;[rr,cc] = size(Image_RGB);
%对RGB三个通道分别进行加密处理
for i = 1:rr/16for j = 1:ccM_data2{i,j} = Image_RGB(16*(i-1)+1:16*i , j,1);end
end%设置密钥
key_hex = {'00' '01' '02' '03' '04' '05' '06' '07' '08' '09' '0a' '0b' '0c' '0d' '0e' '0f'};
%AES初始化[SBOX,invSBOX,w,polys,invpolys] = func_AES_parameter(key_hex); %加密处理
for i = 1:rr/16for j = 1:ccimages_AES{i,j} = func_AES(double(M_data2{i,j}),w,SBOX,polys,1);end
end%显示加密后的图像
for i = 1:rr/16for j = 1:cctmp                           = (images_AES{i,j})';iamges_aes(16*(i-1)+1:16*i,j) = double(tmp);end
end
axes(handles.axes2);
imshow(iamges_aes,[]);% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
global Image_RGB;
global SBOX;
global invSBOX;
global w;
global polys;
global invpolys;
global images_AES;[rr,cc] = size(Image_RGB);
%解密处理
for i = 1:rr/16for j = 1:ccimages_deAES{i,j} = func_invAES(images_AES{i,j},w,invSBOX,invpolys,1);end
end
%显示解密后的图像
for i = 1:rr/16for j = 1:cctmp                             = (images_deAES{i,j})';iamges_deaes(16*(i-1)+1:16*i,j) = double(tmp);end
endaxes(handles.axes3);
imshow(iamges_deaes,[]);% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
clc;
clear;
close all;

4.操作步骤与仿真结论

AES界面如下所示:

AES加密如下所示:

AES解密如下所示:

5.参考文献

AES的理论主要依据参考文献,

A29-01

6.完整源码获得方式

方式1:微信或者QQ联系博主

方式2:订阅MATLAB/FPGA教程,免费获得教程案例以及任意2份完整源码

【AES图像加解密】基于AES图像加解密算法的MATLAB仿真相关推荐

  1. 【超分辨率图像重建】基于POCS超分辨率图像重建算法的MATLAB仿真

    1.软件版本 matlab2013b. 2.本算法理论知识 随着信息处理技术和视觉通信技术的高速发展,人们获取的知识量爆炸式增长,因此迫切的要求完善的信息处理技术为人们提供更加方便.快捷服务.数字图像 ...

  2. 【kd树故障检测】基于KDtree的电路故障检测算法的MATLAB仿真

    目录 1.软件版本 2.核心代码 3.操作步骤与仿真结论 4.参考文献 5.完整源码获得方式 1.软件版本 MATLAB2021a 2.核心代码 clear demo_case = [1,2,3,4] ...

  3. 基于OCR的字母识别算法的matlab仿真

    1.算法简介 OCR识别可以分为数字扫描对象的获取,数字图像的生产,数字图像的处理和OCR文本识别等四个阶段.OCR识别在信息资源数字化工作中应用时,其准确度一直是人们关注的焦点,因为OCR精确识别是 ...

  4. 基于EM参数估计的SAGE算法的MATLAB仿真

    EM算法结构如下所示: SAGE算法结构如下所示: 这里主要以SAGE的基本结构进行算法仿真.整个MATLAB的算法的流程如下所示: 第1步:参数初始化: 第2步:产生发送信号,主要函数是

  5. 基于PSO的运输优化算法的MATLAB仿真

    假设有一个收集轨道,上面有5个采集堆,这5个采集堆分别被看作一个4*20的矩阵(下面只有4*10),每个模块(比如:A31和A32的元素含量不同),为了达到采集物品数量和元素含量的要求(比如:需采集5 ...

  6. matlab ssgs工具箱,基于PI控制方式的1A开关电源MATLAB仿真研究

    基于 PI 控制方式的 1A 开关电源 MATLAB 仿真研究学院:电气与光电工程学院专业:电气工程及其自动化班级:基于 PI 控制方式的 1A 开关电源 MATLAB 仿真研究0目录0 绪论 --- ...

  7. 【ISAR成像定标方法(4)—基于参数估计法的方位维定标MATLAB仿真】

    目录 前提介绍 基于LOG算子的目标散射点提取 基于ICPF的转速估计 ISAR成像定标仿真实验 结语 前提介绍 本章内容简介:分析了CPF(三次相位函数法),CICPF(相干三次相位函数法)和ICP ...

  8. matlab仿真限幅发散,基于模糊控制的直流电机调速系统MATLAB仿真_贾东耀

    基于模糊控制的直流电机调速系统MATLAB 仿真 贾东耀,曾智刚 (广东工业大学,广州市 510090) 摘 要:采用Fuzzy-PI 控制策略进行直流电机的调速系统设计,它克服了简单模糊控制和传统P ...

  9. 基于瞬时无功功率ip-iq的谐波信号检测MATLAB仿真

    建议使用MATLAB2021b 资源: 基于瞬时无功功率ip-iq的谐波信号检测MATLAB仿真资源-CSDN文库 整体模型: 模型具体工作原理不做介绍,因为此方法很老,参考文献巨多!!!  单相输入 ...

  10. 神经网络pid控制器MATLAB,基于BP神经网络的PID控制器及其MATLAB仿真.pdf

    基于BP神经网络的PID控制器及其MATLAB仿真.pdf 2009 NO.10 中国新技术新产品 China New Technologies and Products 高新技术 基于BP 神经网络 ...

最新文章

  1. 搭建高效、可靠、稳定的WEB服务器
  2. ssm中怎么使tomcat一起动就执行一个controller_【200期】面试官:你能简单说说 SpringMVC 的执行原理吗?...
  3. webstorm快捷键生成html页面,webstorm工具使用的快捷键
  4. acm公选课笔记 2020.3.31
  5. ARP(Address Resolution Protocol)地址解析协议初识
  6. Android用GSon处理Json数据
  7. java能够运行的原理_JAVA程序运行原理分析(一)
  8. weblogic搭建
  9. 软件工程实践2017第一次作业
  10. 求ax bx c 0的根c语言,关于求方程ax2+bx+c=0根的问题
  11. Linux服务器authorized_keys添加公钥后登录仍需要密码
  12. Bzoj 3831: [Poi2014]Little Bird
  13. XLNet 和BERT的区别是什么?
  14. C语言实现顺序表基本操作
  15. ARDUINO LCD显示简单的汉字、符号(保姆级教程!)
  16. 一般描绘性形容词_英语中描绘性形容词是指哪种形容词?
  17. #4017. 复制粘贴(copypaste)
  18. php 邮箱服务,laravel邮箱服务使用
  19. 阿里云服务器购买过程中必须了解的注意事项
  20. 如何制作一个在线订酒店的小程序

热门文章

  1. Algorithm Course Review(7.1)
  2. mssql的T-SQL教程(从建登陆到建库、表和约束)
  3. UA MATH567 高维统计 专题0 为什么需要高维统计理论?——协方差估计的高维效应与Marcenko-Pastur规则
  4. UA MATH523A 实分析1 度量空间 概念与定理总结
  5. *Codeforces587E. Duff as a Queen
  6. IDEA 初始配置教程
  7. android布局中显示隐藏动画
  8. Java 第三周总结
  9. 【电商】几种电商模式及特点
  10. Windows XP中防火墙后如何实现共享(图)