I can't find much documentation on this, is it possible to encrypt/decrypt data within a tezos smart contract? So how would I do something like AES crypto (although does not matter much) in a smart contract?
2 Answers
There are currently no encrypt/decrypt instructions for Michelson. You can view the full list of instructions here: http://tezos.gitlab.io/mainnet/whitedoc/michelson.html
It's not clear what decrypting data from within a smart contract would achieve since all operations are public.
- obviously all transactions and data is public, encryption in a smart contract could be used to implement something like a vickery auction (en.wikipedia.org/wiki/Vickrey_auction) - all bidders send in their bid during bid period, bids only get known to public after bid period is over. btw this is not an answer this should have been a comment.joschua011– joschua0112019-02-03 17:41:06 +00:00Commented Feb 3, 2019 at 17:41
- 1You can do that with hash commitments, no need for encryptionArthur B– Arthur B2019-02-03 18:40:47 +00:00Commented Feb 3, 2019 at 18:40