How to do galois multiplication?

5 Ansichten (letzte 30 Tage)
Darsana P M
Darsana P M am 28 Dez. 2017
Kommentiert: Walter Roberson am 9 Jan. 2018
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?

Akzeptierte Antwort

Akira Agata
Akira Agata am 28 Dez. 2017
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 Kommentare
Darsana P M
Darsana P M am 9 Jan. 2018
What might be the issue?
Walter Roberson
Walter Roberson am 9 Jan. 2018
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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by