Re: Bit-swaps
- From: jonas.thornvall@xxxxxxxxxxx
- Date: Sun, 7 Sep 2008 09:37:23 -0700 (PDT)
On 4 Sep, 16:44, hayes...@xxxxxxxxx wrote:
I was looking at bit-swaps as a means of disconnection passwords from
data
Looking at a single byte 8 bits labeling the bits ABCD EFGH
I wanted to see the number of potential swaps that existed obvious for
a swap that means your bit has to move so no duplicates and it can not
remain in the same location.
The result being 14833 combinations a small fraction of 8 to the power
of 8. Which means you need a minimum of 14 bits of data to be able to
select all the combinations. Even then it isn't an even distribution.
The best bet is to use enough data to cover the field numerous times
and reduce the unevenness of usage. going to a full 2 bytes would help
but it would be more effective to use 3 bytes of data even if you did
something like (B1*B2*B3)%14833.
This would be even more effective with larger values 16 bits, 32, 64,
and 128. However, I am not sure it can be done to a very large scale
certainly not using a table they would be far to large. It also can
make for a fairly intensive routine.
char List[]="ABCDEFGH";
unsigned int t=0;
for (int a=0;a<8;a++){
for (int b=0;b<8;b++){
for (int c=0;c<8;c++){
for (int d=0;d<8;d++){
for (int e=0;e<8;e++){
for (int f=0;f<8;f++){
for (int g=0;g<8;g++){
for (int h=0;h<8;h++){
if(a!=b && a!=c && a!=d && a!=e && a!=f && a!=g && a!=h && b!=c &&
b!=d && b!=e && b!=f && b!=g && b!=h && c!=d && c!=e && c!=f && c!=g
&& c!=h && d!=e && d!=f && d!=g && d!=h && e!=f && e!=g && e!=h && f!
=g && f!=h && g!=h)
{if(a!=0 && b!=1 && c!=2 && d!=3 && e!=4 && f!=5 && g!=6 && h!=7)
{cout<<t<<" "<<List[a]<<" "<<List[b]<<" "<<List[c]<<"
"<<List[d]<<" "<<List[e]<<" "<<List[f]<<" "<<List[g]<<"
"<<List[h]<<"\n";t++;}}
}}}}}}}}
You idea is good but you make it more complicated then it need to be.
Any password can be transformed to a permutation table of invidual
elements.
And there is nothing that prevents the actual table from holding more
states than the actual key.
With other words even an 8 bit password can be transformed into a 4096
bit key.
.
- Follow-Ups:
- Re: Bit-swaps
- From: jonas . thornvall
- Re: Bit-swaps
- References:
- Bit-swaps
- From: hayes . gr
- Bit-swaps
- Prev by Date: Re: What exactly is avalanche effect?
- Next by Date: What if avalanche effect on the key, actually affect every bit in cipher?
- Previous by thread: Re: Bit-swaps
- Next by thread: Re: Bit-swaps
- Index(es):
Relevant Pages
|
Loading