openfaas / store

Official Function and Template Store for OpenFaaS
MIT License
162 stars 56 forks source link

Submission Request, LSB Steganography function #79

Open auyer opened 5 years ago

auyer commented 5 years ago

I created a steganography function that can be usefull for some, and fun for others. Hope you find it interesting. It has 100% test coverage and CircleCi integration in my repo.

{
    "title": "LSB Steganography",
    "description": "LSB steganography encoding/decoding on base64 images",
    "images": {
        "x86_64": "auyer/fn-steganography"
    },
    "name": "steganography",
    "repo_url": "https://github.com/auyer/fn-steganography",
    "labels": {
        "com.openfaas.ui.ext": "json"
    }
}
alexellis commented 5 years ago

Hi thanks for your interest in the Function Store and for putting together a proposal for a submission. I believe you spoke with @LucasRoesler on Slack? (I have not read that conversation yet)

I have a few questions/concerns:

I gave similar feedback to #36 #41 for the same reasons. I think for this to be used in the store we need a text pane / tutorial to go with it. Or we need to implement hiding so that users are not confused by submissions in the UI, but can deploy via the CLI if they want to search out the GitHub repo and find out how to use it.

Let me know your thoughts.

LucasRoesler commented 5 years ago

@alexellis i was just looking at this when I saw your message.

The docker image is reasonably 22.2MB , it is a go based project,

auyer/fn-steganography                                     latest                                           99ebed771e09        4 hours ago         22.2MB

I looked at the source repo and it does describe both an encode and an decode step. It would be interesting if there was an independent way for the to verify it.

@auyer I would look at https://github.com/esimov/pigo-openfaas and https://github.com/alexellis/repaint-the-past for examples of functions in the store that also deal with images and pull the image from a URL. The Pigo function is also written in go.

auyer commented 5 years ago

@alexellis

what does it do? Hide text on an image? How would a user verify that it worked?

LSB Steganography hides any bynary message in the Least Significant bit. It can be text, encrypted data, or even other images depending only on their size. Check out this article about it.

The best way to verify if it worked if to do the reverse operation. This is what I do in the unit tests.

what are the parameters? It seems to take a 3-key JSON dictionary but this isn't going to work well with the current UI. The current functions take as single input i.e. a URL of an image or binary data via HTTP POST

I use this function internally in a software, and that is why the interface is json with a base64 encoded image.

When I was playing with the functions in the store like mememachine, I had to check their repo for a how-to-use tutorial. There is a similar guide to what I found on mememachine on my README ( both functions use json).

There is alo a guide on how to take a file and upload it with curl to the function. This is in the botton of the README, I might just bring it up.

It would be interesting if there was an independent way for the to verify it.

@LucasRoesler Do you mean checking this with a different software ?


Possible changes:

LucasRoesler commented 5 years ago

@auyer yes, is it possible to check the message in the image without using the function?

auyer commented 5 years ago

Any software written using the same Steganography strategy ( or the same lib) will be able to do it, but other libs might not be compatible. This one records a "header" with the size of the message before the message itself.

This standalone script uses the same method, and the lib's own usage example works as well. I tested one Python script (the one in the article about steganography) that uses a different strategy, but it doesnt seem to be compatible.

auyer commented 4 years ago

Hi, I just updated the PR #80. I re-tested this function extensively, and improved the code to be more forgiving. Hope its fine now.