필터 지우기
필터 지우기

I HAVE A KEY WHICH IS 1*16 MATRIX. HOW CAN I DETERMINE IT'S BIT SIZE?

조회 수: 3 (최근 30일)
sabitri
sabitri 2022년 8월 16일
댓글: sabitri 2022년 8월 16일
KEY=[0 0 1 0 3 12 8 7 7 8 12 3 0 1 0 0]

채택된 답변

KSSV
KSSV 2022년 8월 16일
KEY=[0 0 1 0 3 12 8 7 7 8 12 3 0 1 0 0] ;
a = single(KEY) ;
iwant = whos('a')
iwant = struct with fields:
name: 'a' size: [1 16] bytes: 64 class: 'single' global: 0 sparse: 0 complex: 0 nesting: [1×1 struct] persistent: 0
  댓글 수: 3
Walter Roberson
Walter Roberson 2022년 8월 16일
편집: Walter Roberson 2022년 8월 16일
Will this key prevent brute force attack
NO it will not prevent brute force attack.
There is no known way of preventing brute force attacks.
There are some famous cases where particular encryption challenges were broken by way of contests that organized thousands of computers on the Internet to keep trying sequential possibilities.
You have 4 bits per entry and 16 entries, for a total of 64 bits. It is accepted that the NSA can brute force 64 bit DES encryption keys, using their custom-built hardware.
sabitri
sabitri 2022년 8월 16일
Okay...It’s clear to me now..Thanks

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

추가 답변 (2개)

Abderrahim. B
Abderrahim. B 2022년 8월 16일
편집: Abderrahim. B 2022년 8월 16일
Hi!
Try this:
KEY = [0 0 1 0 3 12 8 7 7 8 12 3 0 1 0 0] ;
KEY = single(KEY) ;
% WHOS returns a structure
S = whos("KEY") ;
S.class
ans = 'single'
% Bit is an eighth of a byte
bitSize = S.bytes * 8
bitSize = 512
Hope this helps

Walter Roberson
Walter Roberson 2022년 8월 16일
KEY=[0 0 1 0 3 12 8 7 7 8 12 3 0 1 0 0]
KEY = 1×16
0 0 1 0 3 12 8 7 7 8 12 3 0 1 0 0
bits_required_per_entry = max( ceil(log2(KEY)) )
bits_required_per_entry = 4
However the calculation changes if any entry might be negative.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by