How to do galois multiplication?

조회 수: 6 (최근 30일)
Darsana P M
Darsana P M 2017년 12월 28일
댓글: Walter Roberson 2018년 1월 9일
Suppose I have 2 cell array inputs as shown below:
A={'fe' 'ff' 'e9' '92' '86' '65' '73' '1c' '6d' '6a' '8f' '94' '67' '30' '83' '08'};
H={'b8' '3b' '53' '37' '08' 'bf' '53' '5d' '0a' 'a6' 'e5' '29' '80' 'd5' '3b' '78';
How to muliply these inputs using galois field multiplication?? Can somebody helpme?

채택된 답변

Akira Agata
Akira Agata 2017년 12월 28일
If you have the Communications System Toolbox, please try the following script.
% Convert to GF(2^8)
gfA = gf(hex2dec(A),8);
gfH = gf(hex2dec(H),8);
% Multiplication in GF(2^8) field
gfAH = gfA .* gfH;
  댓글 수: 10
Darsana P M
Darsana P M 2018년 1월 9일
What might be the issue?
Walter Roberson
Walter Roberson 2018년 1월 9일
GFRefArray = gf([0:(2^1)-1]);
contains only 0 and 1 because that is what you asked for. It would need to be
function DECout = gf2dec(HA)
N = 8;
c = 0 : (2^N)-1;
GFRefarray = gf(c, N);
for i = 1:length(HA)
for k = c
if isequal(HA(i),GFRefarray(k+1));
DECout(i)=k;
end
end
end

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Error Detection and Correction에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by