Back to Home

Steganography in acroconstructions. DANTSOVA Algorithm

steganography · Dontsova · dantsova · acroconstructions · acrostic · machine learning · just4fun · borsch ! · fool's day

Steganography in acroconstructions. DANTSOVA Algorithm

    - Then she decided to get rid. In!
    “She! .. so good?”
    - Ah, no difference ...

    For a long time I wanted to publish this just4fun steganography projection, but something did not have time.
    And now the time and reason was found .
    Also Friday! I once decided to implement steganography in acroconstructions . For clarity, to do, as in acrostics , only automate the process and build acro offers automatically. In short, to repeat the idea of Tritemia , only programmatically;) The interface of the final program is simple:







    1. the user enters a message in Russian;
    2. the program produces acrotext. (This is the text by the first letters of each word of which you can collect the original message).


    For example, the query " hello habr !" The program is written lyrics: " n Otomi p eshila and zbavitsya in a e d t ak x watering and b ithout p Difference". The program does not place punctuation marks yet - this is done by the user at his discretion.

    Of course, far from naitive Russian, but for a just4fun project written on my knee for a couple of evenings, I think it will fit ...

    The algorithm learns from countless novels by Daria Dontsova . That is why he is named after her - DANTSOVA .

    Who cares how all this works, I ask for a cut!



    Acrostic and acroconstruction



    Acrostic is a poem in which the first letters of each line make up a meaningful text (word, phrase or sentence).

    For example, the famous acmeist Nikolai Gumilev once wrote to his wife ( Anna Akhmatova ) this poem:
    And ddis Ababa, the city of roses.
    H and the banks of streams transparent,
    H ebesny divas brought you,
    And lmaznoy, amid gloomy gorges.

    A rmidin garden ... There pilgrim
    X hurt vow of love obscure
    ( M s all bow before him),
    A stuffy roses, red roses.

    T am looking into the soul of someone's eyes,
    about herbs and full of deceptions,
    in the gardens of tall sycamore,
    A lleyah gloomy plane trees.

    Acrostic is the simplest version of acro construction .
    Acroconstruction is a more general concept; if in the acrostic the interspersing occurs in the first letters of each line, then in the acroconstruction - in any arbitrary place.

    For example, can you write something like this on March 8 for your girlfriend ?:


    What's weak? That's it!

    Poetry has left us with many similar examples. To whom this topic is interesting, it is advisable to read the articles by Ivan Chudasov
    " From acrostic to acroconstruction " and " From acrostic to acroconstruction (continued) ." In my opinion, these are the best articles on this topic: on the one hand, accessible to the general public, on the other hand, not vulgar.

    The question arises, how to create such texts?

    There are essentially three classes of methods.
    1. Create text yourself. This is exactly what poets did for hitting Johann Heidenberg Tritemius.
    2. Create text programmatically. For example, the DANTSOVA algorithm
    3. Combine the software method and the operator’s creativity . In my opinion, this is the most interesting thing that you can think of. The program creates a certain number of variants of different words, then the person selects the most semantically appropriate word from the list, then the program creates another word ... And so on, until you get a single whole text


    Principles of the DANTSOVA Algorithm



    Who is too lazy to read the mathematical part can immediately go to the chapter "Sources & examples" .
    I tell you for the rest.

    There are many different theories how a collection of letters, spaces and punctuation marks turn into meaningful text. To create a really good algorithm, I need to devote this task, as I think, all my life.

    I was wondering if there were any extremely simple ideas that could be embodied in a simple and uncomplicated program. The purpose of the DANTSOVA algorithm is to show that the task of artificial construction of acrotexts is not an impossible task.

    The DANTSOVA algorithm is based on several very understandable ideas.
    Of course, adding more rules in the generation of the text, you can get a better result,
    but in DANTSOVA we will limit ourselves to only four provisions - “thoughts”.

    Thought 1. The word depends on the past word.



    After the word " tasty " to see the word " milk " is quite expected.
    But after the word " tasty " you are unlikely to see the word " synchrophasotron ".
    First, synchrophasotrons do not eat; secondly, the words are not harmonized: the synchrophasotron is masculine, and the word “ tasty ” is average.

    Of course, the word depends not only on the previous, but also on the previous, etc.
    However, I did not take this into account because of the curse of dimensionality .

    Thus, you need to take a lot, a lot of text and look at the pairs: “word is the next word”.
    After you need to create a view structure:
    word the next word weight
    word the next word weight
    .........


    weight is set simply - how many times after the " word " was the " next word "?
    For example, Daria Dontsova (see the dantsova.d0.plf file in source )
    for her rich career after the word “ armed ” used the word “ bouquet ” three times!
    And after the word " deceive " the word " seksterrorista " occurs only once.

    We will call this plate a platform .

    Obviously, different platforms are built on different text bodies .

    Thought 2. The platform needs to be built on the body of texts of one author



    The essence of this thought is that the text should be "of the same type."
    The corpus consisting of articles about Valery Kharlamov, the Falkland War and the works of Richard Bach does not suit us ...
    These are completely different types of texts.

    The texts of various authors also have such a thing, which philologists call an idiolect .
    Speaking Russian is a personal dialect. Those. the method of speaking and writing that is specific to you.

    Those. by purely experimental means, I have established that it is necessary to take the corpus of text of one author.
    Otherwise, you get perfect crap, no different from randomness.

    Thought 3. The larger the body, the better



    This is an obvious thought. Therefore, the author who should be taken should be very prolific (not from a qualitative, but from a quantitative point of view).

    For example, Peter Ershov is not suitable, since he wrote only one fairy tale: The Little Humpbacked Horse.
    The tale of Fedot Sagittarius Leonid Filatov is also not an option.

    Thought 4. The more primitive the quality of the text - the better



    The richer and more interesting the author, the more varied his speech.
    We do not need such authors.
    For example, Joseph A. Brodsky wrote more poems than Pushkin.
    But the platform on the body of Brodsky’s poems doesn’t work out very well ...

    Total.



    So, we need an author with a primitive speech, who wrote a lot of meaningful text on the same subject.
    What is the most primitive in speech? That's right: detective novels for girls of fifty and the program “Let They Shout” with Andrei Malakhov. Since the subtitles “Let yell” I did not find, then limited to detective novels.

    So, Daria Dontsova (by the way, her real name is Agripina Arkadevna) turned out to be the method of exclusion by this prolific author !

    Now it remains to make a very simple generation algorithm.
    After each word, you should choose a word starting with the desired letter and with maximum weight.
    Here, in fact, is the whole algorithm.

    Boring nuance
    The algorithm has parameter c .
    This is a configurable system parameter .
    It shows the desired number of words in a sentence.

    The algorithm puts an end to the word A and writes the next letter X independently of A in two cases:
    1. when there is no word B starting on X with more weight.
    2. when the length of the sentence is greater than c



    A boring nuance №2
    There is a case when after the words A1 and A2 it is impossible to pick up the words A3 ... It simply does not exist.
    In this case, we either break off the sentence (parameter c ) or go back a step,
    replace A2 with some A2 * , whose weight is in second place, and after A2 * we look for A3 .


    Sources & Examples



    A few examples.
    It is clear that this is far from practical application, but not at all random! ..
    Certain semantics are slipping ...
    DANTSOVA Algorithm in Action
    messageacroconstruction
    glorify our fatherland our free fraternal peoples century-old unionNow it’s better, but aside I’m very difficult to get it through him with you, in general, not so hot.
    the driver elena sergeevna, in general, without any special money, there was a mouth on one of her and you are not in the fridge.
    completely different bodies the case was away from the Jurassic recorded in her to the window took one.
    yogurt
    scientific directornot so hot.
    in a week.
    yyy.
    yogurt of the Russian criminal code.
    it is generally yes and even better here.
    Eyyafyadlayoukullthis is.
    yogurt i phrase i'm even better but iodine came to my senses.
    already to Yule’s home I’ll lie down
    millions of you darkness and darkness and darknessme and only a lightweight product one leg in america stand on an abortion to do so much interesting you me here too.
    me
    for motherland for Stalinfor April.
    since she didn’t even have time for April-September.
    only the address of the lead and not so hot
    Habrahabr well, it makes no difference a mistress and it makes no difference
    how once in the overgrown horsetails roared from a consciousness of impotencehow Alexander swears.
    did not eat cabbage vegetables mushrooms add orange.
    anyway and then there was a deafening whistling noise and ok now I want in general.
    schA Alina grunted Rose Elena Vadimovna.
    her face and she so to speak about health is not so hot tasteless.
    from a box her paper with him and nothing more.
    gori.
    obviously
    Gloky cuzdra Shteko Budlanula Bokra and curls pokryonkawhere one class was lying and I nodded, and the door swung open automatically.
    A driver only if he was at the elevator door and on the street, Lisa cuts without any special complexes.
    absolutely sincerely.
    as I opened a little heart attack at the door, it would be just in the kitchen
    I hope this nonsense will be counted for the passed python course in Shadnot so hot.
    for her skirt with her husband did not eat for April September.
    as here, and Jura is quiet.
    it’s you who have already said only to wonder why he and you know the address the girl said to him.
    yogurt kefir.
    already told how much I remember them here she is not so hot.
    everything went well for her
    our western partnersnot so hot.
    driver for April.
    then gently add a little.
    yyy.
    her address is located that did not eat stew.
    yyy


    If you want more, you can do it yourself.
    Sources are here: https://github.com/PavelMSTU/DANTSOVA

    Steganography



    Now we ask ourselves: how to do steganography on all this?

    But very simple!
    First, you can choose not the first letter, but an arbitrary one determined determinately by a key.
    Secondly, each letter (or word, or sequence of words) can be associated with a certain sequence of bits.
    This can be done using hash steganography .

    In short - there are many different ideas for translating the most perverted and treacherous steganographic fantasies!

    And it will be security, but not clearly, like the DANTSOVA algorithm .

    FAQ


    Anticipating the three questions, I proactively answer them .

    Why is the algorithm called dAntsova and not dOntsova?
    There are several points of view on such a heartbreaking issue.
    Some say that this was done on purpose, saying that if Agripina Arkadyevna (in short, just Daria) tries to sue what she has already done with rutracker, the author will say that it is not named after her, because the surname is different.
    But there is another point of view, according to which changing the letter O to A is a special steganographic transmission of a secret message.
    However, skeptics say that PavelMSTU just needs to sleep more and work less, then there will be no problems with spelling.

    Why do we intersperse the first letter, because this is not security?
    The purpose of the topic and the algorithm itself is not in security, but in visualization .
    The author wanted to show that by writing three * .py files on his knees and accumulating a large amount of text by one author, a certain result can be achieved.
    And without any deep learning and dozens of man-years of any research institute ...
    Of course, for practical use, intermediate coding should be invented, as described in the article.

    PavelMSTU, why didn’t you consider the cases, gender, number? And in general, where it so ronnye network and dip lorning?
    While the goal was to make the simplest design. This is the next step.


    Your question is not in the FAQ? - ask him in the comments!

    Only registered users can participate in the survey. Please come in.

    Does acrosteganography have a future?

    • 51% Yes, if you do everything in security: encryption + encoding "a sequence of bits -> pieces of text" 48
    • 48.9% No, you can only generate text for spam; LSB is our everything! 46

    Read Next