Stormworks: Build and Rescue

Stormworks: Build and Rescue

十分な評価がありません
Ponys Microcontroller Tools - Encryption and Decryption Example
   
アワード
お気に入り
お気に入り
お気に入りから削除
タグ: v0.10.29
ファイルサイズ
投稿日
104.387 KB
2020年7月10日 8時22分
1 項目の変更履歴 ( 表示 )

サブスクライブしてダウンロード
Ponys Microcontroller Tools - Encryption and Decryption Example

解説
What do i see in the video above?
On the right you see the encrypted composite, on the left you see the decrypted composite

Encrypts and decrypts 30 numbers of a composite
  • Choose any integer as the key (Available range: -16,000,000 to +16,000,000)
  • floats loose a tiny bit of precision (< 1%)

Details about the encryption algorithm
Because of the limited characters and the limited performance of lua ingame, it is impossible to effectively implement currently used algorithms (both symetric and asymetric).
Even worse, in lua we have no access to the raw float bits, which makes number encryption even harder.

Algorithm (simplyfied):
Every tick, a random number m is generated.
The original value (e.g. channel 1 = 3.141) is now modified.
encrypted value = original value + m + (channel id)
  • We ensure that m is a high value, but also has some decimals.
    This is mandatory, because its not helpfull if gps coordinates are encrypted from (x=876,y=123.2) to (x=875.5,y=122.7).
  • Same rule applies for very small values (e.g. battery level) which would be encrypted from (b=0.25) to (b=9000.25).
  • By changing m every tick, we make sure people cannot guess a value by observing its change over time.
  • By adding the channel id we also make sure, that we effectively never use the same modifier m twice. This makes sure, that even if two input values are corelated (e.g. fuel in tank 1 and fuel in tank 2) its very hard to spot that corelation in the encrypted data.
  • The last thing we do is, we shift the channels. This ensures, that even if someone knows on which channel a guessable value would be sent, the encrypted composite does not have this encrypted value on the same channel. This prevents attacks by guessing an original value (e.g. altitude of a vehicle).

Microcontrollers
Encryption
Decryption


Collection of all the tools
https://steamhost.cn/steamcommunity_com/workshop/filedetails/?id=2080346369

See it as a challenge to break the algorithm
I will put your name in here, and if you also can develop a fix i will update the microcontroller ;)
5 件のコメント
[20.]Goblox432 2024年4月15日 4時57分 
IT is using the in Off signall to Figur Out a number and that number plus a multipication If 30 ist the key
CrazyFluffyPony  [作成者] 2024年4月15日 4時24分 
Ah okay. then it's not a flaw in the algorithm.

Still, well done implementing a brute force system for it.
[20.]Goblox432 2024年4月15日 2時21分 
To be fair i used the brute force aproche so the best fix is simply using a high value as your key https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3223124653
CrazyFluffyPony  [作成者] 2024年4月14日 12時37分 
Awesome. Post me the link so i can add it to the description.
Do you have a fix for it too?
[20.]Goblox432 2024年4月9日 9時34分 
I managed to build a microcontroller to break the encryption