Jump to content

Trying to "decrypt" something.

Nineshadow
Go to solution Solved by Nineshadow,
25 minutes ago, DXMember said:

that's not how algorithmic problems on the internet work - you don't go around asking for solutions... you solve it or you move on

Nevermind, I've got it.

It's really hacky but it somehow works.

The technique works like this :

 

There are 3 people who want to communicate secretly. They communicate only at certain times, in so-called "communication sessions". In a single communication session, they can exchange multiple messages. Now, for every message, each person picks an integer x so that x=c(mod3). You could say that x is the message itself,but whatever. For person A, c is 0, for person B, c is 1 and for person C , c is 2 (all the time) . In other words, this means that A,B and C pick numbers of the form 3p,3p+1 and 3p+2 respectively.

At the end of a session, this sum is calculated :

S=Σ(xi-1)xi(xi+1) for i=1 to n (where n is the number of exchanged messages in the respective session)

 

Now, given this sum, I need to find out how many messages were sent, who sent them, and what number each sender chose. If there are multiple solutions, the one with the least number of messages will be shown.

For example, if S=120 then there was 1 message sent by person C who chose the number 5.

If S=1001616, then there were 2 messages sent : 1 by person A, with the number 12, and 1 by person B, with the number 100.

i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to comment
Share on other sites

Link to post
Share on other sites

can't you just use public key encryption?

CPU: Intel i7 5820K @ 4.20 GHz | MotherboardMSI X99S SLI PLUS | RAM: Corsair LPX 16GB DDR4 @ 2666MHz | GPU: Sapphire R9 Fury (x2 CrossFire)
Storage: Samsung 950Pro 512GB // OCZ Vector150 240GB // Seagate 1TB | PSU: Seasonic 1050 Snow Silent | Case: NZXT H440 | Cooling: Nepton 240M
FireStrike // Extreme // Ultra // 8K // 16K

 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, DXMember said:

can't you just use public key encryption?

This is an algorithmic problem I found online. It's not practical. I just need to find a technique inverse to the one they presented. I'm really out of ideas though.

i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Nineshadow said:

This is an algorithmic problem I found online. It's not practical. I just need to find a technique inverse to the one they presented. I'm really out of ideas though.

that's not how algorithmic problems on the internet work - you don't go around asking for solutions... you solve it or you move on

CPU: Intel i7 5820K @ 4.20 GHz | MotherboardMSI X99S SLI PLUS | RAM: Corsair LPX 16GB DDR4 @ 2666MHz | GPU: Sapphire R9 Fury (x2 CrossFire)
Storage: Samsung 950Pro 512GB // OCZ Vector150 240GB // Seagate 1TB | PSU: Seasonic 1050 Snow Silent | Case: NZXT H440 | Cooling: Nepton 240M
FireStrike // Extreme // Ultra // 8K // 16K

 

Link to comment
Share on other sites

Link to post
Share on other sites

25 minutes ago, DXMember said:

that's not how algorithmic problems on the internet work - you don't go around asking for solutions... you solve it or you move on

Nevermind, I've got it.

It's really hacky but it somehow works.

i5 4670k @ 4.2GHz (Coolermaster Hyper 212 Evo); ASrock Z87 EXTREME4; 8GB Kingston HyperX Beast DDR3 RAM @ 2133MHz; Asus DirectCU GTX 560; Super Flower Golden King 550 Platinum PSU;1TB Seagate Barracuda;Corsair 200r case. 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×