Exetools  

Go Back   Exetools > General > Source Code

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 04-04-2018, 05:55
floaters floaters is offline
Friend
 
Join Date: Apr 2018
Posts: 9
Rept. Given: 0
Rept. Rcvd 1 Time in 1 Post
Thanks Given: 12
Thanks Rcvd at 6 Times in 3 Posts
floaters Reputation: 1
Interesting puzzle

The solution is to write the problem as a matrix vector multiplication and invert the matrix using integer modulo arithmetic. The key is then given by multiplying with the inverse matrix with modulo.

For the first problem of key length 5 and modulo 31 the inverse matrix is
{
{25, 25, 25, 25, 25},
{25, 28, 14, 7, 19},
{25, 14, 19, 28, 7},
{25, 7, 28, 19, 14},
{25, 19, 7, 14, 28}
}
For the problem of key length 7 and modulo 127 the inverse is:
{
{109, 109, 109, 109, 109, 109, 109},
{109, 118, 59, 93, 110, 55, 91},
{109, 59, 110, 91, 118, 93, 55},
{109, 93, 91, 59, 55, 118, 110},
{109, 110, 118, 55, 59, 91, 93},
{109, 55, 93, 118, 91, 110, 59},
{109, 91, 55, 110, 93, 59, 118}
}

i<3Code
Reply With Quote
The Following User Gave Reputation+1 to floaters For This Useful Post:
deepzero (04-04-2018)
The Following 2 Users Say Thank You to floaters For This Useful Post:
dila (04-09-2018), niculaita (04-05-2018)
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On


Similar Threads
Thread Thread Starter Forum Replies Last Post
.NET Reactor v. 6.7.0.0 CF and String Cleaners Source Code Aesculapius Source Code 0 08-28-2021 02:13
Code snippet for Base34 Encoding TempoMat General Discussion 11 03-29-2020 17:58
Base Encoding Library for Delphi XorRanger Source Code 0 04-30-2015 15:37


All times are GMT +8. The time now is 19:19.


Always Your Best Friend: Aaron, JMI, ahmadmansoor, ZeNiX, chessgod101
( Since 1998 )