Wolfram Mathematica

Encrypt and Store a Treasure Map on the Cloud

Any Wolfram Language expression can be encrypted.

Generate a strong symmetric key derived from a secret password using the Blowfish method.

In:= skeletonKey = GenerateSymmetricKey["Avast ye!", Method -> "Blowfish"]
Out= Encrypt the location of the treasure, stored in a GeoMarker and visualized using GeoGraphics, using the generated key.

show complete Wolfram Language input
In:= treasureMap = GeoGraphics[{GeoMarker[GeoPosition[{15.9429, -86.5031}], Text[Style["x", FontFamily -> "Bradley Hand", FontSize -> 24]]]}, FrameLabel -> "Where the Gold is Buried", Frame -> True, ImageSize -> 300, GeoBackground -> "StreetMapNoLabels"]
Out= In:= hiddenTreasure = Encrypt[skeletonKey, treasureMap]
Out= Now that the data is safely encrypted using a local key, upload the map to the Wolfram Cloud.

In:= stowed = CloudPut[hiddenTreasure]

In order to cover the tracks, discard the original map and key using Clear.

In:= Clear[hiddenTreasure]
In:= Clear[skeletonKey]

Since the key was derived using a password, you can create a new key using the original input.

In:= newKey = GenerateSymmetricKey["Avast ye!", Method -> "Blowfish"]
Out= The new key can now be used to reference the cloud-deployed map.

In:= reclaimedMap = Decrypt[newKey, CloudGet[stowed]]
Out= Extract the location of the treasure.

In:= treasureLocation = reclaimedMap[[3, 2]]
Out= Ask for driving directions.

In:= TravelDirections[{\$GeoLocation, treasureLocation}] Out= As there is no driving route to the treasure, compute its distance using GeoDistance.

In:= GeoDistance[\$GeoLocation, treasureLocation]
Out= Given the distance, locate the nearest airport to the treasure.

In:= airport = First[GeoNearest["Airport", treasureLocation]]
Out= The distance from that airport to the treasure.

In:= GeoDistance[airport, treasureLocation]
Out= 