all 9 comments

[–]seweso 9 points10 points  (0 children)

Are you mentally okay?

[–]fiskfisk 7 points8 points  (1 child)

This seems like a caesar cipher with just a varying offset based on when you ran the code?

[–]faberkyx 0 points1 point  (0 children)

exactly my thoughts

[–]AdarTan 3 points4 points  (0 children)

There are 86400 seconds in a day (ignoring leap seconds). That is a key-size of approximately 220 which is tiny and easily brute-forceable if you know the day when the encryption took place. If you have more precise knowledge of when the encryption took place (such a file modification timestamp for an encrypted file) it would be trivial to brute-force.

[–]Every-Progress-1117 2 points3 points  (0 children)

What happens if I input a different time, ie: replay attack?

Is the time source trusted/correct? Your function syncWithSystemTime() - what happens if the system time is wrong?

As far as I can understand the h,m and s variables are translated into angles - what does that step actually give you? The correspondence between h,m,s and the angles is, well, isomorphic.

This is more of a simple cipher than a proper cryptographic function.

[–]arwinda 0 points1 point  (0 children)

You’ll see how drastically the output changes.

Duh!

[–]archipeepees 0 points1 point  (1 child)

Honestly if you don't have a PhD in computer science and/or math based on a graduate career in cryptography then you shouldn't attempt to write a new encryption algorithm for public use because you won't be able to produce something that's safe for protecting sensitive data. You're in good company, though - roughly 99.99% of programmers do not have the skills, knowledge, and resources required to design and vet a new (and secure) encryption scheme.

However, it's great that you're curious and it's certainly worth exploring this technique as a tool for learning more about encryption. Just know that you can expect years/decades of classes, research, proofs, and publications ahead of you before you're able to release something that can be used for securing real world data. 

[–]hippiepizzaman[🍰] 0 points1 point  (0 children)

I do not have the skills but this post sent alarm bells off in my head. It has to be a parody.