- Then I decided to get rid of. In!
“Hey! .. so good?
- Oh, no difference ...
I have long wanted to publish this just4fun project on steganography, but something didn’t have time.
And here is the time and
reason found .
Besides Friday!

I decided to implement steganography in
acro designs somehow .
For clarity, to make, as in
acrostic , just automate the process and build acropropositions automatically. In short, repeat the idea of
Trithemia , only programmatically;)
')
The interface of the final program is simple:
- the user enters a message in Russian;
- The program produces an acrotext. (This is the text, the first letters of each word which you can collect the original message).
For example, the query "
Hi Habr !" The program wrote the text: "To solve this,
and to add
to the problem is
well worth it." The program does not place punctuation marks yet - this is done by the user at his own discretion.
Certainly far from naitive Russian, but for a just4fun project written on my knee in a couple of evenings, I think will fit ...
The algorithm is trained in
countless novels by
Darya Dontsova . That is why he is named after her -
DANTSOVA .
Who cares how it all works, please under the cat!
Acrostics and acro constructions
An 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 Gumilyov once wrote to his wife (
Anna Akhmatova ) such a poem:
And ddis-Abeba, the city of roses.
On the bank of clear streams,
N heavenly divine brought you,
And a diamond, in the gloomy gorges.
And rmidin garden ... There pilgrim
X hurts the vow of love obscure
(We all bow down before him),
And roses are stuffy, roses are red.
T am looking into the soul of someone's eyes,
O grass full and deceptions,
In the gardens of high sycamore,
And lleyah gloomy plane trees.
Acrostic is the easiest version of
acro construction .
Acoustic construction is a more general concept; if in an acrostic, blotching occurs in the first letters of each line, then in acro-construction - in any arbitrary place.
For example, can you write to your girlfriend on March 8 something like this ?:

What is weak? That's it!
Poetry has left us many similar examples. To whom this topic is interesting, then we advise you to read the articles of
Ivan Chudasov"
From acrostic to acroconstruction " and "
From acrostic to acrodesign (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?
In fact, there are three classes of methods.
- Create text yourself. This is exactly what the poets did by johann Heidenberg Trithemius.
- Create text programmatically. For example the algorithm DANTSOVA
- Combine the software method and the creativity of the operator . In my opinion this is the most interesting thing you can think of. The program creates a certain number of variants of various words, then a 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 algorithm DANTSOVA
Who is too lazy to read the mat.part can go directly to the chapter
"Sources & Examples" .
For the rest I tell.
There are many different theories, as a set of letters, spaces and punctuation turn into meaningful text. To create a really good algorithm, you need to devote your whole life to this task, as I think.
I was wondering if there are any extremely simple ideas that could be implemented in a simple and uncomplicated program. The goal of the
DANTSOVA algorithm
is to show that the task of artificially constructing acrotexts is not an impossible task.
The
DANTSOVA algorithm
is based on several very clear ideas.
Of course by adding more rules in the generation of the text you can get a better result,
however, in
DANTSOVA we will limit ourselves to only four points - “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 can hardly see the word "
synchrophasotron ".
First, synchrophasotrons do not eat; secondly, the words are not coordinated: 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 one, etc.
However, I did not take this into account because of the
curse of dimension .
Thus, you need to take a lot of text and look at pairs: “the word is the next word”.
After it is necessary to create a structure of the form:
word | next word | weight |
word | next word | weight |
... | ... | ... |
weight is set simply - how many times after the "
word " was the "
next word "?
For example Daria Dontsova (see the file
dantsova.d0.plf in the source )
for her rich career after the word "
armed " she used the word "
bouquet " three times!
And after the word "
seduce " the word "
sexterrorist " occurs only once.
This label will be called the
platform .
It is obvious that different
platforms are built on different
text boxes .
Thought 2. The platform must be built on the corpus of texts of one author
The essence of this idea is that the text should be “of the same type”.
The corps consisting of an article about Valeriy Kharlamov, the Falkland War and the work of Richard Bach is not suitable for us ...
These are completely different types of texts.
Also, the texts of various authors have such a thing, which philologists call
idiolect .
Speaking Russian is a personal dialect. Those. the method of speaking and writing is peculiar to you.
Those. purely by experience, I found that the
body of the text of one author should be taken.
Otherwise, it turns out a perfect crap, no different from the random.
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 does not fit, as he wrote only one fairy tale: The Humpbacked Horse.
The tale about Fedot Strelets 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 Aleksandrovich Brodsky wrote more poems than Pushkin.
But the platform on the body of Brodsky’s poetry does not work out very ...
Total.
So, we need an author with a primitive speech, who wrote many, many meaningful texts of one subject.
What is the most primitive in speech? That's right: detective novels for girls from fifty and the transfer of "Let them yell" with Andrei Malakhov. Since the subtitles "Let them yell," I did not find, I limited myself to detective novels.
So
Daria Dontsova turned out to be the method of exclusion by this prolific author (by the way, her real name is Agripina Arkadyevna)!
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 the maximum weight.
That's the whole algorithm.
Boring nuanceThe algorithm has a parameter
with .
This is a
custom system
parameter .
It shows the desired number of words in the sentence.
The algorithm puts a dot after the word
A and writes the next letter
X , regardless of
A, in two cases:
- when there is no word B starting at X with more weight.
- when sentence length is greater than c
Boring nuance number 2There 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 terminate the sentence (parameter c ), or go back a step,
Replace A2 with some A2 * , the weight of which 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 it is not at all random! ..
Certain semantics slips ...
Algorithm DANTSOVA in actionmessage | acroconstruction |
---|
Glory to the fatherland of our free brotherly nations century union | Now it's better, but aside, I find it very difficult to go through it with you. In general, not so hot. Elena Sergeevna’s chauffeur, in general, without much money, her mouth was on one of them, and you and anyone from the refrigerator didn’t. completely different bodies, the case was set aside. From the Jurassic, she took one in her window. yogurt |
scientific director | not so hot in a week. yyy. Yogurt Russian Criminal Code. in general she is even better. |
Eyyafyadlayoukuudl | this. Yoghurt I am the phrase I even better and iodine came to my senses. I'll go to bed already |
millions of us of us darkness and darkness and darkness | me and only a light product of one leg in america stand for an abortion to make so many interesting things you and me here. me |
for motherland for Stalin | for April. since she did not even have time for April September. only the address of the lead and not so hot |
habrabra | good and without a difference and mistress but without a difference |
how once in the overgrown horsetails roared from the consciousness of impotence | as Alexander swears. did not eat cabbage vegetables mushrooms add orange. anyway and then there was a deafening whistle noise and well now I want in general. schola Alina chuckled a rose elena vadimovna. her face and she doesn’t taste good about health. from the box her paper with you and only. y. clearly |
glosse kzdra shteko bukanula bokra and curls bokkryonka | where one class was lying and I nodded left the door swung open automatically. the chauffeur is only if he was at the elevator door and on the street is a liza and without special complexes he cuts. absolutely sincere. like a door I opened a little heart attack then he would just in the kitchen |
I hope that this nonsense will be counted for passing the course of the python in the sad | not so hot for her skirt with her husband did not eat for april september. what's here and the Jurassic is quiet. You said this only to wonder why he and you know the address, the girl said, but to him. yogurt kefir. already told how much I remember them here she is not so hot. everything went well for her |
our western partners | not so hot chauffeur and for april. then gently add a little. yyy. her address is located he did not eat stew. yyy |
If you want more, you can foment yourself.
Sources are here:
https://github.com/PavelMSTU/DANTSOVASteganography
Now let us ask ourselves a question: how to make steganography on all of this?
And very easy!
First, you can choose not the first letter, but an arbitrary, deterministically determined key.
Secondly, it is possible for each letter (or word, or sequence of words) to associate a certain sequence of bits.
This can be done using
hash steganography .
In short - there are many different ideas for the realization of the most perverted and cunning steganographic fantasies!
And it will be security, but not clearly, like the
DANTSOVA algorithm.
FAQ
Foreseeing three questions, proactively answer them .
Why is the algorithm called dAntsova, and not dOntsova?There are several points of view on such a heartbreaking question.
Some say that it was done on purpose, they say if Agripina Arkadyevna (simply Daria) is trying to sue,
which she has already done with rutracker, the author will declare 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 transfer of the 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 sprinkle in the first letter, because this is not security?The purpose of the topic and the algorithm itself is not in security, but in clarity .
The author wanted to show that by writing three * .py files on my lap and accumulating a large amount of the text of one author, one can achieve a certain result.
And without any deep learning and dozens of person-years of any research institute ...
Of course, for practical use, you should come up with an intermediate encoding, as described in the article.
PavelMSTU, why did you not take into account the cases, gender, number? And anyway, where is it <s> t </ s> ron nets and dip rörning?While the goal was to make the most simple design. This is the next step.
Your question is not in the FAQ? - ask it in the comments!