Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #64884 > unrolled thread
| Started by | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| First post | 2015-07-07 17:08 -0700 |
| Last post | 2015-08-22 22:49 -0700 |
| Articles | 20 on this page of 33 — 7 participants |
Back to article view | Back to comp.lang.c
Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-07 17:08 -0700
Re: Fun/Funny Fractal Encryption... Richard Heathfield <rjh@cpax.org.uk> - 2015-07-08 01:12 +0100
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-07 17:19 -0700
Re: Fun/Funny Fractal Encryption... Robert Wessel <robertwessel2@yahoo.com> - 2015-07-07 22:29 -0500
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-07 22:43 -0700
Re: Fun/Funny Fractal Encryption... Robert Wessel <robertwessel2@yahoo.com> - 2015-07-08 03:23 -0500
Re: Fun/Funny Fractal Encryption... James Kuyper <jameskuyper@verizon.net> - 2015-07-08 07:36 -0400
Re: Fun/Funny Fractal Encryption... Richard Heathfield <rjh@cpax.org.uk> - 2015-07-08 12:52 +0100
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-08 11:10 -0700
Re: Fun/Funny Fractal Encryption... James Kuyper <jameskuyper@verizon.net> - 2015-07-08 14:46 -0400
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-08 12:10 -0700
Re: Fun/Funny Fractal Encryption... Richard Heathfield <rjh@cpax.org.uk> - 2015-07-08 20:41 +0100
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-09 09:55 -0700
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-09 11:18 -0700
Re: Fun/Funny Fractal Encryption... Richard Heathfield <rjh@cpax.org.uk> - 2015-07-09 19:25 +0100
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-09 13:49 -0700
Re: Fun/Funny Fractal Encryption... Richard Heathfield <rjh@cpax.org.uk> - 2015-07-09 22:09 +0100
Re: Fun/Funny Fractal Encryption... Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-07-08 00:49 -0700
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-07 23:05 -0700
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-07 23:15 -0700
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-10 12:25 -0700
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-10 15:09 -0700
Re: Fun/Funny Fractal Encryption... Richard Heathfield <rjh@cpax.org.uk> - 2015-07-15 15:52 +0100
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-31 13:40 -0700
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-31 13:43 -0700
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-07-31 13:46 -0700
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-08-21 14:45 -0700
Re: Fun/Funny Fractal Encryption... Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-22 01:29 +0100
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-08-21 20:03 -0700
Re: Fun/Funny Fractal Encryption... Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-08-22 13:02 +0100
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-08-22 18:15 -0700
Re: Fun/Funny Fractal Encryption... "Chris M. Thomasson" <nospam@nospam.nospam> - 2015-08-16 12:10 -0700
Re: Fun/Funny Fractal Encryption... luser droog <luser.droog@gmail.com> - 2015-08-22 22:49 -0700
Page 1 of 2 [1] 2 Next page →
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-07 17:08 -0700 |
| Subject | Fun/Funny Fractal Encryption... |
| Message-ID | <mnhpm5$fh9$1@speranza.aioe.org> |
FWIW, here is the first pre-alpha version of a, IMHO, fun/funny
little toy program I wrote when I had to think about one-time
pad like encryption. I thought it might be fun to encrypt
plaintext with fractals such that a formula, and several
other settings, would be used as a key. So, the number of
characters in a given text would be used to create a grid
that is used to generate a fractal. I am using escape time
Julia set for now. The escape counts can be used to build
the key for a one-time pad. Here is a sample program that
can encrypt/decrypt strings. Take a look at the `main'
function. The string to be encrypted, the original string so
to speak, is in the `omsg' variable. The encrypted string is
stored in `emsg', and the final decrypted string is stored
in `dmsg'. `dmsg' should be equal to `omsg'. I will explain
this further when I get some more time. Anyway, here is the
code:
http://pastebin.com/Rjw3U7WK
___________________________________________________
/* Mandelbrot Set ASCII by Chris M. Thomasson :^)
___________________________________________________________________*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#define CT_MIN(mp_0, mp_1) (((mp_0) < (mp_1)) ? (mp_0) : (mp_1))
#define CT_SQ(mp_n) ((mp_n) * (mp_n))
#define CT_MBROT_ABET_PUNC \
" ,./\\;'[]-=<>?:""{}_+`~"
#define CT_MBROT_ABET_NUM_SHIFT \
"!@#$%^&*()"
#define CT_MBROT_ABET_NUM \
"0123456789"
#define CT_MBROT_ABET_UPPER \
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
#define CT_MBROT_ABET_LOWER \
"abcdefghijklmnopqrstuvwxyz"
#define CT_MBROT_ABET \
CT_MBROT_ABET_UPPER \
CT_MBROT_ABET_LOWER \
CT_MBROT_ABET_NUM \
CT_MBROT_ABET_NUM_SHIFT \
CT_MBROT_ABET_PUNC
#define CT_MBROT_ABET_MOD (sizeof(CT_MBROT_ABET) - 1U)
#define CT_MBROT_ABET_LOOKUP(mp_char) \
((strchr(CT_MBROT_ABET, (mp_char))) - CT_MBROT_ABET)
struct ct_mbrotcp_pixel
{
double x;
double y;
};
struct ct_mbrotcp_plane
{
double xmin;
double xmax;
double ymin;
double ymax;
};
struct ct_mbrotvp_plane
{
unsigned int width;
unsigned int height;
};
unsigned int
ct_mbrotpixel(
struct ct_mbrotcp_pixel const* pixel_c,
unsigned int const imax
){
unsigned int i = 0;
unsigned int ret = 0;
struct ct_mbrotcp_pixel pixel_z = *pixel_c;
struct ct_mbrotcp_pixel pixel_z_sq = {
CT_SQ(pixel_z.x), CT_SQ(pixel_z.y)
};
struct ct_mbrotcp_pixel pixel_cj = { -0.7, 0.0 };
double cmin = 9999999999999.0;
for (i = 0; i < imax; ++i)
{
pixel_z.y = pixel_z.x * pixel_z.y * 2.0 + pixel_cj.y;
pixel_z.x = pixel_z_sq.x - pixel_z_sq.y + pixel_cj.x;
pixel_z_sq.x = CT_SQ(pixel_z.x);
pixel_z_sq.y = CT_SQ(pixel_z.y);
cmin = CT_MIN(cmin, CT_SQ(pixel_z_sq.x) + CT_SQ(pixel_z_sq.y));
if (pixel_z_sq.x + pixel_z_sq.y > 2357)
{
ret = (unsigned int)(113747 * fabs(cos(i * cmin * 573)));
putchar(CT_MBROT_ABET[ret % CT_MBROT_ABET_MOD]);
return ret;
}
}
{
unsigned int mc = 0;
ret = (unsigned int)(234777 * fabs(sin(i * cmin * 3233)));
mc = ret % CT_MBROT_ABET_MOD;
putchar(CT_MBROT_ABET[mc]);
/* uncomment to display points that escape as "blanks" */
/* putchar(' '); */
}
return ret;
}
void
ct_mbrotplane(
struct ct_mbrotcp_plane const* cp_plane,
struct ct_mbrotvp_plane const* vp_plane,
unsigned int const imax,
unsigned int* icounts
){
unsigned int vpyi = 0;
struct ct_mbrotcp_pixel cp_pixel = { 0.0, 0.0 };
double const cp_width = cp_plane->xmax - cp_plane->xmin;
double const cp_height = cp_plane->ymax - cp_plane->ymin;
double const xstep = cp_width / vp_plane->width;
double const ystep = cp_height / vp_plane->height;
for (vpyi = 0; vpyi < vp_plane->height; ++vpyi)
{
unsigned int vpxi = 0;
cp_pixel.y = cp_plane->ymax - vpyi * ystep;
for (vpxi = 0; vpxi < vp_plane->width; ++vpxi)
{
cp_pixel.x = cp_plane->xmin + vpxi * xstep;
unsigned int icount = ct_mbrotpixel(&cp_pixel, imax);
if (icounts)
{
unsigned int i = (vpyi * vp_plane->width) + vpxi;
icounts[i] = icount;
}
}
putchar('\n');
}
}
/* Funny Fractal Encryption
___________________________________________________________________*/
#define CT_FFE_ABET_NUM CT_MBROT_ABET_PUNC
#define CT_FFE_ABET_UPPER CT_MBROT_ABET_UPPER
#define CT_FFE_ABET_LOWER CT_MBROT_ABET_LOWER
#define CT_FFE_ABET CT_MBROT_ABET
#define CT_FFE_ABET_MOD CT_MBROT_ABET_MOD
#define CT_FFE_ABET_LOOKUP CT_MBROT_ABET_LOOKUP
struct ct_ffe
{
struct ct_mbrotcp_plane cp_plane;
struct ct_mbrotvp_plane vp_plane;
unsigned int* icounts;
};
int
ct_ffe_create(
struct ct_ffe* const self
){
unsigned int n = self->vp_plane.width * self->vp_plane.height;
self->icounts = calloc(n, sizeof(*self->icounts));
if (self->icounts)
{
return 1;
}
return 0;
}
void
ct_ffe_destroy(
struct ct_ffe* const self
){
free(self->icounts);
}
void
ct_ffe_encrypt_prepare(
struct ct_ffe* const self,
unsigned int const imax
){
ct_mbrotplane(&self->cp_plane, &self->vp_plane, imax, self->icounts);
}
int
ct_ffe_encrypt(
struct ct_ffe* const self,
char const* omsg,
unsigned int omsg_size,
char* emsg,
unsigned int emsg_size
){
unsigned int i = 0;
if (emsg_size < omsg_size)
{
return 0;
}
for (i = 0; i < omsg_size; ++i)
{
unsigned int icount = self->icounts[i] % CT_FFE_ABET_MOD;
unsigned int cx = CT_FFE_ABET_LOOKUP(omsg[i]);
unsigned int ec = (cx + icount) % CT_FFE_ABET_MOD;
emsg[i] = CT_FFE_ABET[ec];
}
return 1;
}
int
ct_ffe_decrypt(
struct ct_ffe* const self,
char const* emsg,
unsigned int emsg_size,
char* dmsg,
unsigned int dmsg_size
){
unsigned int i = 0;
if (dmsg_size < emsg_size)
{
return 0;
}
for (i = 0; i < emsg_size; ++i)
{
unsigned int icount = self->icounts[i] % CT_FFE_ABET_MOD;
unsigned int cx = CT_FFE_ABET_LOOKUP(emsg[i]);
int ec = cx - icount;
if (ec < 0)
{
ec = cx + CT_FFE_ABET_MOD;
ec = abs(icount - ec);
}
dmsg[i] = CT_FFE_ABET[ec];
}
return 1;
}
/* Sample FFE Usage Program
___________________________________________________________________*/
int
main(void)
{
char omsg[] = "/Fun\\ <with> [Fractals]! (tm) `Hello'";
char emsg[sizeof(omsg)] = { '\0' };
char dmsg[sizeof(omsg)] = { '\0' };
unsigned int n = sizeof(omsg) - 1;
unsigned int dim = (((unsigned int)sqrt(n)) + 1);
unsigned int dim_scale = 3;
unsigned int gwidth = dim * dim_scale;
unsigned int gheight = gwidth;
struct ct_ffe fe = {
{ -1.1, 1.0, -1.0, 1.413 },
{ gwidth, gheight },
NULL
};
if (ct_ffe_create(&fe))
{
printf(
"CT_FFE_ABET_MOD = %u\r\n"
"________________________________\r\n"
"Fractal Pad: z^2 + c (Julia Set)\r\n"
"Grid Dims: %u x %u\r\n"
"--------------------------------\r\n",
(unsigned int)CT_FFE_ABET_MOD,
gwidth,
gheight
);
ct_ffe_encrypt_prepare(&fe, CT_FFE_ABET_MOD * dim_scale);
printf("________________________________\r\n");
if (ct_ffe_encrypt(&fe, omsg, n, emsg, n))
{
if (ct_ffe_decrypt(&fe, emsg, n, dmsg, n))
{
printf("\r\noriginal = %s\r\n\r\n", omsg);
printf("encrypted = %s\r\n\r\n", emsg);
printf("decrypted = %s\r\n", dmsg);
}
}
ct_ffe_destroy(&fe);
}
return 0;
}
___________________________________________________
Now to think about all of the floating point issues...
;^)
[toc] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-07-08 01:12 +0100 |
| Message-ID | <mnhppt$n9t$1@dont-email.me> |
| In reply to | #64884 |
On 08/07/15 01:08, Chris M. Thomasson wrote: > FWIW, here is the first pre-alpha version of a, IMHO, fun/funny > little toy program I wrote when I had to think about one-time > pad like encryption. I thought it might be fun to encrypt > plaintext with fractals such that a formula, and several > other settings, would be used as a key. So, the number of > characters in a given text would be used to create a grid > that is used to generate a fractal. I am using escape time > Julia set for now. The escape counts can be used to build > the key for a one-time pad. No, they can't. The key for a one-time pad must be generated using a truly random process. Chaos is not the same as randomness. For further details, ask in sci.crypt. -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-07 17:19 -0700 |
| Message-ID | <mnhqbe$gi3$1@speranza.aioe.org> |
| In reply to | #64885 |
> "Richard Heathfield" wrote in message news:mnhppt$n9t$1@dont-email.me... > > On 08/07/15 01:08, Chris M. Thomasson wrote: [...] > > The escape counts can be used to build > > the key for a one-time pad. > No, they can't. The key for a one-time pad must be generated using a truly > random process. Chaos is not the same as randomness. For further details, > ask in sci.crypt. Right. I just thought it would be fun to use fractals to build a pseudo key for a one-time pad. Sorry I did not specify this. I have to go now. Hope you don't think that this is just a plain stupid project? For some reason, I get a kick out of it. lol. ;^)
[toc] | [prev] | [next] | [standalone]
| From | Robert Wessel <robertwessel2@yahoo.com> |
|---|---|
| Date | 2015-07-07 22:29 -0500 |
| Message-ID | <bk5ppahds6st5l08opjbffkuopsdq0e1b5@4ax.com> |
| In reply to | #64886 |
On Tue, 7 Jul 2015 17:19:49 -0700, "Chris M. Thomasson" <nospam@nospam.nospam> wrote: >> "Richard Heathfield" wrote in message news:mnhppt$n9t$1@dont-email.me... > >> > On 08/07/15 01:08, Chris M. Thomasson wrote: >[...] >> > The escape counts can be used to build >> > the key for a one-time pad. > >> No, they can't. The key for a one-time pad must be generated using a truly >> random process. Chaos is not the same as randomness. For further details, >> ask in sci.crypt. > >Right. I just thought it would be fun to use fractals to build a pseudo key >for >a one-time pad. Sorry I did not specify this. I have to go now. Hope you >don't >think that this is just a plain stupid project? For some reason, I get a >kick out >of it. You've created a stream cipher. Which is fine (although I have considerable doubts about the actual security of this one). OTPs have some special properties, which lead to their provable security, but this fails most of them. Which is not a problem - no stream (or for that matter block) cipher is provably secure either. But it's *not* an OTP. Part of the problem is that many people see OTPs, and that they offer provable security, and see that the major problem with them is key generation, and come up with some mechanical way to generate the keys. This, of course, entirely invalidates the proof of security, but that point is usually missed by those folks, who then call what they have an OTP, implying a (wholly unjustified) level of security. OTOH, that mechanical generation of a key stream is the basis of a stream cipher. The field is unfortunately chock full of kooks who don't understand that (and refuse to learn), so there's more than a bit of a knee-jerk reaction to anyone who misuses the term.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-07 22:43 -0700 |
| Message-ID | <mnid9r$g0i$1@speranza.aioe.org> |
| In reply to | #64892 |
> "Robert Wessel" wrote in message > news:bk5ppahds6st5l08opjbffkuopsdq0e1b5@4ax.com... >> On 08/07/15 01:08, Chris M. Thomasson wrote: [...] >> The escape counts can be used to build >> the key for a one-time pad. [...] >> For some reason, I get a >> kick out of it. > You've created a stream cipher. Which is fine (although I have > considerable doubts about the actual security of this one). [...] I know this is a false OTP. I hope I do not come across as a 100% KOOK! ;^o There is a problem with an aspect of security. The location of the fractal is in a rather poor location for the code as-is. There is a symmetrical effect as I am going down the real line of the complex plane. Now, if I go up the imaginary line a bit, well, there are places where the symmetry of the real line is not able to be observed. Therefore the FAKE keys are not going to "show" an obvious symmetry as well. This is not the only problem with security. However, I think it would be kind of a PITA to figure out what fractal formula encrypted a cyphertext. Also, at what zoom, and location on the plane? Humm...
[toc] | [prev] | [next] | [standalone]
| From | Robert Wessel <robertwessel2@yahoo.com> |
|---|---|
| Date | 2015-07-08 03:23 -0500 |
| Message-ID | <fdnppapq6913nud0mdskfi7mckqj9ls9ri@4ax.com> |
| In reply to | #64894 |
On Tue, 7 Jul 2015 22:43:15 -0700, "Chris M. Thomasson" <nospam@nospam.nospam> wrote: >> "Robert Wessel" wrote in message >> news:bk5ppahds6st5l08opjbffkuopsdq0e1b5@4ax.com... > >>> On 08/07/15 01:08, Chris M. Thomasson wrote: >[...] >>> The escape counts can be used to build >>> the key for a one-time pad. >[...] >>> For some reason, I get a >>> kick out of it. > >> You've created a stream cipher. Which is fine (although I have >> considerable doubts about the actual security of this one). > >[...] > >I know this is a false OTP. I hope I do not come across as a >100% KOOK! The actual name for a "false OTP" is "stream cipher".
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2015-07-08 07:36 -0400 |
| Message-ID | <mnj1t4$77o$1@dont-email.me> |
| In reply to | #64894 |
On 07/08/2015 01:43 AM, Chris M. Thomasson wrote: ... > However, I think it would be kind of a PITA to figure out what > fractal formula encrypted a cyphertext. Also, at what zoom, and > location on the plane? Keep in mind that the only thing that matters, as far as decryption is concerned, is that there is a pattern to your key. The pattern itself can be deduced from a sufficiently large encrypted sample, using entirely different methods from the one you used to generate the pattern. -- James Kuyper
[toc] | [prev] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-07-08 12:52 +0100 |
| Message-ID | <mnj2qn$ad8$1@dont-email.me> |
| In reply to | #64901 |
On 08/07/15 12:36, James Kuyper wrote: > On 07/08/2015 01:43 AM, Chris M. Thomasson wrote: > ... >> However, I think it would be kind of a PITA to figure out what >> fractal formula encrypted a cyphertext. Also, at what zoom, and >> location on the plane? > > Keep in mind that the only thing that matters, as far as decryption is > concerned, is that there is a pattern to your key. The pattern itself > can be deduced from a sufficiently large encrypted sample, using > entirely different methods from the one you used to generate the pattern. The idea that the adversary has to play by your rules is a very common misconception, especially in cryptography but also in other fields. I was once bored enough to watch one of those traffic cop videos where the police forced a vehicle off the motorway onto a sliproad, where they had set up a road block at the other end. In the UK, the hard shoulder is not a carriageway as such, you're not allowed to drive on it except in an emergency, and in fact it is supposed to be left clear precisely for such emergency use, and therefore the police didn't block the hard shoulder. So when the villain arrived at the road block, he simply drove around it and headed off into the distance. It is commonplace for cryptonewbies to come up with a cipher that they think is unbreakable because the sheer computing power needed to brute-force the cipher is unthinkably enormous. I would recommend to such people that they read up on Charles Babbage, Friedrich Kasiski, Marian Rejewski, Alan Turing, etc etc. -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-08 11:10 -0700 |
| Message-ID | <mnjp2c$o9r$1@speranza.aioe.org> |
| In reply to | #64901 |
> "James Kuyper" wrote in message news:mnj1t4$77o$1@dont-email.me... > > On 07/08/2015 01:43 AM, Chris M. Thomasson wrote: ... > > However, I think it would be kind of a PITA to figure out what > > fractal formula encrypted a cyphertext. Also, at what zoom, and > > location on the plane? > Keep in mind that the only thing that matters, as far as decryption is > concerned, is that there is a pattern to your key. Absolutely correct. For some reason, I still think that it might be kind of difficult to find the actual formula that created the key in the first place. IMVHO, finding the key would be the easy part! Once you have worked, used computing power, to find the key, well, why not try to find the formula that created the key for fun? lol. ;^) > The pattern itself can be deduced from a sufficiently large encrypted > sample, using entirely different methods from the one you used to > generate the pattern. Do you happen to know of any pattern matching software that can work with plaintext? I would love to see how the key can be cracked out of a fractal pattern in a location that has no “obvious symmetry”. Now, I have to admit that sounds more interesting than creating the toy/funny encryption program itself. Once the key is obtained/cracked out of a given cyphertext, I would REALLY love to see how to find either the original formula, or another one that produces the same results! Wow. BTW, I am thinking about posting this over in scr.crypt just to see if somebody can crack out a key, or fractal pad if you will. I just do not want to come across as a total kook moron! Sorry. ;^o
[toc] | [prev] | [next] | [standalone]
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Date | 2015-07-08 14:46 -0400 |
| Message-ID | <559D7019.9060406@verizon.net> |
| In reply to | #64950 |
On 07/08/2015 02:10 PM, Chris M. Thomasson wrote: >> "James Kuyper" wrote in message news:mnj1t4$77o$1@dont-email.me... ... >> Keep in mind that the only thing that matters, as far as decryption is >> concerned, is that there is a pattern to your key. > > Absolutely correct. For some reason, I still think that it > might be kind of difficult to find the actual formula that > created the key in the first place. IMVHO, finding the key > would be the easy part! > > Once you have worked, used computing power, to find the key, > well, why not try to find the formula that created the key > for fun? Because that formula is not unique. I've a strong background in math and science, and that background tells me that there can be many different ways of expressing the same thing. For instance, compare the Newtonian, Hamiltonian, and Lagrangian formulations of classical mechanics. It's possible to prove that they all produce identical results, but I couldn't possibly have guessed that without having seen those proofs. >> The pattern itself can be deduced from a sufficiently large encrypted >> sample, using entirely different methods from the one you used to >> generate the pattern. > > Do you happen to know of any pattern matching software that > can work with plaintext? It's not my specialty. What little I know of cryptography is that it involves a lot of analysis programs that pass information on to skilled professionals who intuit the pattern from the output of those programs. That impression is almost certainly four or five decades out-of-date; I'd be very surprised if the NSA doesn't have standalone programs that can do this, at least in some cases, entirely without human intervention. > BTW, I am thinking about posting this over in scr.crypt just > to see if somebody can crack out a key, or fractal pad if you > will. I just do not want to come across as a total kook moron! That's a good idea - they know far more about this than I do. From my understanding of the current state of the art, I wouldn't be surprised if public domain shareware is available that could crack your code in seconds - without producing any output that is recognizable as the parameters or the structure of the fractal model you used to create it.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-08 12:10 -0700 |
| Message-ID | <mnjsk1$1pg$1@speranza.aioe.org> |
| In reply to | #64955 |
>"James Kuyper" wrote in message news:559D7019.9060406@verizon.net... >>On 07/08/2015 02:10 PM, Chris M. Thomasson wrote: >>> "James Kuyper" wrote in message news:mnj1t4$77o$1@dont-email.me... ... >>> Keep in mind that the only thing that matters, as far as decryption is >>> concerned, is that there is a pattern to your key. >> >> Absolutely correct. For some reason, I still think that it >> might be kind of difficult to find the actual formula that >> created the key in the first place. IMVHO, finding the key >> would be the easy part! >> >> Once you have worked, used computing power, to find the key, >> well, why not try to find the formula that created the key >> for fun? >Because that formula is not unique. I've a strong background in math and >science, and that background tells me that there can be many different >ways of expressing the same thing. Ahhh. Well, that sort of implies that there is more than z = z^2 + c that can create the Mset, along with all of its antennae. There has been much work in the field wrt deriving an iterated function system that can reproduce the Mset. So far, none have worked. The code I posted uses Julia sets which do have workable inverses for different powers: http://www.fractalforums.com/ifs-iterated-function-systems/julia-set-inverse-iteration However, the Mset is a different story! Julias have that nice constant point property. The Mset has a unique point for each point of escape time iteration. Therefore the inverse of a Mset seems like a major PITA. Yikes! ;^o BTW, I need to ponder the rest of your post to give a proper response James. Thanks. :^)
[toc] | [prev] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-07-08 20:41 +0100 |
| Message-ID | <mnjual$uni$1@dont-email.me> |
| In reply to | #64956 |
On 08/07/15 20:10, Chris M. Thomasson wrote: >>"James Kuyper" wrote in message news:559D7019.9060406@verizon.net... > > >>Because that formula is not unique. I've a strong background in math and >>science, and that background tells me that there can be many different >>ways of expressing the same thing. > > Ahhh. Well, that sort of implies that there is more than > z = z^2 + c that can create the Mset, No, it doesn't. Your program's output may have been derived from the Mandelbrot set, but that doesn't mean there isn't some other algorithm that will produce the same result /without/ deriving it from the Mandelbrot set. Let me give you a simpler example, to illustrate the point. Alice writes a program to generate a keystream using a highly complicated algorithm: x[n] = f(x[n-1]) where f() is a scary function that returns a positive integer. As a final step, she uses the given value as an exponent to 5 using her shiny new bignum package, and because she only needs a single digit she now reduces the value modulo 10, so the value actually used for encryption is 5^(x[n]) % 10. Her keystream output (which she obviously didn't bother to check) is: 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 It is not difficult to deduce the next number in the keystream without having to know anything at all about f(). -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-09 09:55 -0700 |
| Message-ID | <mnm91p$9mr$1@speranza.aioe.org> |
| In reply to | #64958 |
> "Richard Heathfield" wrote in message news:mnjual$uni$1@dont-email.me...
> > On 08/07/15 20:10, Chris M. Thomasson wrote:
> >>"James Kuyper" wrote in message news:559D7019.9060406@verizon.net...
> >
> >
> >>Because that formula is not unique. I've a strong background in math and
> >>science, and that background tells me that there can be many different
> >>ways of expressing the same thing.
> >
> > Ahhh. Well, that sort of implies that there is more than
> > z = z^2 + c that can create the Mset,
> No, it doesn't. Your program's output may have been derived from the
> Mandelbrot set, but that doesn't mean there isn't some other algorithm
> that will produce the same result /without/ deriving it from the
> Mandelbrot set.
Okay. That makes sense to me. I would really like to see how
another algorithm can rip out a key from a given cypertext.
For instance, here are two identical 11 letter words encrypted
with the same formula, or key if you will:
=!xcp7j:3Ee
ct0^[tZT/T%
The only difference is that the second one is in a slightly
different location in the fractal. However, it still uses the
exact same formula.
Another example, using the same 11 letter word:
=!xcp7j:3Ee
=]S4>q4.Bb$`$1M>fB{]Qu
The second is the word repeated twice. Notice how the code
changes for the first occurrence of the word?
This type of behavior might make it a little more difficult to
gain a pattern from ciphertext.
> Let me give you a simpler example, to illustrate the point. Alice writes a
> program to generate a keystream using a highly complicated algorithm: x[n]
> = f(x[n-1]) where f() is a scary function that returns a positive integer.
> As a final step, she uses the given value as an exponent to 5 using her
> shiny new bignum package, and because she only needs a single digit she
> now reduces the value modulo 10, so the value actually used for encryption
> is 5^(x[n]) % 10.
> Her keystream output (which she obviously didn't bother to check) is:
> 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5
> It is not difficult to deduce the next number in the keystream without
> having to know anything at all about f().
lol! That's pretty funny.
Thanks Richard.
:^)
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-09 11:18 -0700 |
| Message-ID | <mnmdu2$laq$1@speranza.aioe.org> |
| In reply to | #65030 |
> "Chris M. Thomasson" wrote in message
> news:mnm91p$9mr$1@speranza.aioe.org...
>> "Richard Heathfield" wrote in message news:mnjual$uni$1@dont-email.me...
> > > On 08/07/15 20:10, Chris M. Thomasson wrote:
> > >>"James Kuyper" wrote in message news:559D7019.9060406@verizon.net...
> > >>Because that formula is not unique. I've a strong background in math
> > >>and
> > >>science, and that background tells me that there can be many different
> > >>ways of expressing the same thing.
> > > Ahhh. Well, that sort of implies that there is more than
> > > z = z^2 + c that can create the Mset,
> > No, it doesn't. Your program's output may have been derived from the
> > Mandelbrot set, but that doesn't mean there isn't some other algorithm
> > that will produce the same result /without/ deriving it from the
> > Mandelbrot set.
> Okay. That makes sense to me. I would really like to see how
> another algorithm can rip out a key from a given cypertext.
> For instance, here are two identical 11 letter words encrypted
> with the same formula, or key if you will:
[...]
> Another example, using the same 11 letter word repeated twice:
> =!xcp7j:3Ee
> =]S4>q4.Bb$`$1M>fB{]Qu
There is a problem with regard to the cyphertext being virtually identical
when one changes a single character in the plaintext.
So, encrypting "Christopher" would give a cyphertext. Now changing the
plaintext to "christopher" would give the same cyphertext with only one
character changed! This is simply terrible.
I think there is a way around this such that changing a single character in
the plaintext would produce radical changes in the cyphertext.
Humm... Need to think.
[toc] | [prev] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-07-09 19:25 +0100 |
| Message-ID | <mnme8g$lpm$1@dont-email.me> |
| In reply to | #65045 |
On 09/07/15 19:18, Chris M. Thomasson wrote: <snip> > I think there is a way around this such that changing a single character in > the plaintext would produce radical changes in the cyphertext. > > Humm... Need to think. Thinking is good. So is asking in sci.crypt about "avalanching". -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-09 13:49 -0700 |
| Message-ID | <mnmmoo$agm$1@speranza.aioe.org> |
| In reply to | #65048 |
> "Richard Heathfield" wrote in message news:mnme8g$lpm$1@dont-email.me...
> > On 09/07/15 19:18, Chris M. Thomasson wrote:
<snip>
> > I think there is a way around this such that changing a single character
> > in
> > the plaintext would produce radical changes in the cyphertext.
> >
> > Humm... Need to think.
> Thinking is good. So is asking in sci.crypt about "avalanching".
I think I just may be on the right track here Richard.
Check this crap out:
http://pastebin.com/wjAwawU3
However, there is a caveat. This new setup produces _two_ keys.
F0 is the formula itself, while F1 is a "unique?" offset into
it derived from the nature of the cleartext. IMVHO, F1 can be
sent across the wire because it is useless without the private
key F0. Therefore F0 would be private, and F1 public. Therefore
A transmission between Alice and Bob would go as follows:
0: Bob and Alice decide on a fractal formula F0 they both think
is beautiful.
1: Bob wants to send a private message M to Alice.
2: Bob gets a setting S for another fractal formula F1 derived
from F0 and encrypts M as EM with F1.
3: Bob sends EM and S across the wire to Alice.
4: Alice uses F0 and S to gain the fractal F1.
5: Alice uses F1 to decrypt EM into M.
6: Alice reads the M.
This would create a unique fractal based on the characters in
the cleartext. Well, do you think this might be good enough to
post over in sci.crypt Richard?
I am a bit nervous.
;^/
FWIW, here is a sample of the output:
________________________________________
original = Christopher
encrypted = \a\R8<d95Rl
decrypted = Christopher
original = christopher
encrypted = zg:~0\:`Mhv
decrypted = christopher
original = ChristopheR
encrypted = !'`O0dHG0P=
decrypted = ChristopheR
________________________________________
This is MUCH better than it was before.
Thank you all for the much appreciated comments, sage advice.
:^D
[toc] | [prev] | [next] | [standalone]
| From | Richard Heathfield <rjh@cpax.org.uk> |
|---|---|
| Date | 2015-07-09 22:09 +0100 |
| Message-ID | <mnmnr5$s7h$1@dont-email.me> |
| In reply to | #65065 |
On 09/07/15 21:49, Chris M. Thomasson wrote: <cryptalgorithm snipped> > This would create a unique fractal based on the characters in > the cleartext. Well, do you think this might be good enough to > post over in sci.crypt Richard? I've seen a lot worse. Why not give it a go? But read the FAQ first (*always* a good plan) - and read a few of the threads, too. By all means post, but try not to put your foot in your mouth before you shoot the foot. :-) -- Richard Heathfield Email: rjh at cpax dot org dot uk "Usenet is a strange place" - dmr 29 July 1999 Sig line 4 vacant - apply within
[toc] | [prev] | [next] | [standalone]
| From | Malcolm McLean <malcolm.mclean5@btinternet.com> |
|---|---|
| Date | 2015-07-08 00:49 -0700 |
| Message-ID | <34418635-a64e-4b0a-82ed-d98cf9b156dd@googlegroups.com> |
| In reply to | #64886 |
On Wednesday, July 8, 2015 at 1:20:09 AM UTC+1, Chris M. Thomasson wrote: > > Right. I just thought it would be fun to use fractals to build a > pseudo key for a one-time pad. Sorry I did not specify this. I have > to go now. Hope you don't think that this is just a plain stupid project? > > For some reason, I get a kick out of it. > Depends what you want to do. We formed a cryptography club at school. It lasted about a term, and was rather fun. It's great to work out amateur systems and see if anyone can beat them. But if you need it for serious encryption of financially-sensitive data, where you might be facing a professional criminal, you need to use professional quality systems. As a caution, when I was at Oxford a friend encrypted his PIN using some code based on Greek letters. Some criminal, who must have been another member of college, found his wallet and bit of paper, broke the code, and ran away with about a thousand pounds.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-07 23:05 -0700 |
| Message-ID | <mniejr$idl$1@speranza.aioe.org> |
| In reply to | #64884 |
> "Chris M. Thomasson" wrote in message
> news:mnhpm5$fh9$1@speranza.aioe.org...
> FWIW, here is the first pre-alpha version of a, IMHO, fun/funny little
> toy program I wrote when I had to think about one-time pad like
> encryption. I thought it might be fun to encrypt plaintext with fractals
> such that a formula, and several other settings, would be used as a key.
One can alter the hard coded Julia set in the code from:
struct ct_mbrotcp_pixel pixel_cj = { -0.7, 0.0 };
To any z^2 Julia. Well, at least to the limits of a double!
;^)
How to:
do a search on the code for the following text:
"struct ct_mbrotcp_pixel pixel_cj"
You should get a single hit. This is where you can specify the
coordinates for a power of two Julia set.
Going down the real line is a BAD CHOICE!
;^O
The symmetry down the real axis is a problem for this particular formula.
[toc] | [prev] | [next] | [standalone]
| From | "Chris M. Thomasson" <nospam@nospam.nospam> |
|---|---|
| Date | 2015-07-07 23:15 -0700 |
| Message-ID | <mnif60$jfo$1@speranza.aioe.org> |
| In reply to | #64895 |
> "Chris M. Thomasson" wrote in message
> news:mniejr$idl$1@speranza.aioe.org...
[...]
> Going down the real line is a BAD CHOICE!
;^O
> The symmetry down the real axis is a problem for this particular formula.
Here is output for the code as-is along with the coordinates of the Julia
set:
struct ct_mbrotcp_pixel pixel_cj = { -0.7, 0.0 };
________________________________
Fractal Pad: z^2 + c (Julia Set)
Grid Dims: 21 x 21
--------------------------------
R$JKDyuGbMl&lMbGuyDKJ
e7Q4}&2&2o@9@o2&2&}4Q
vWF2@IpE3?=6=?3EpI@2F
'Zd)8_\X8($)$(8X\_8)d
>Ng7%H/*gcFYFcg*/H%7g
rVw/Q+ %fno5onf% +Q/w
=81IFtEDO8gOg8ODEtFI1
Rf( AtT_ybASAby_TtA (
zZ.73G*?gQNSNQg?*G37.
vmC=wXg~`+<t<+`~gXw=C
w%c$$?x{pM!c!Mp{x?$$c
O}[l~P/]:Kn=nK:]/P~l[
$UTTQyQ8@P'n'P@8QyQTT
A2z-<%fDQ!gxg!QDf%<-z
Z&d2UkD[KG9:9GK[DkU2d
KT!^IKwqj0 K 0jqwKI^!
B{jOY eQ~x)6)x~Qe YOj
xYHt+f*6JB 7 BJ6*f+tH
.QC2qbkiJdP;PdJikbq2C
Y*9Z%hv*uA^s^Au*vh%Z9
w~#JkI(Ogt:3:tgO(IkJ#
________________________________
Notice the symmetry staring you in the face!
For instance, the string:
AtT_ybASAby_TtA
That seems odd to me.
Well, here is the pseudo/fake key at a location in the
complex plane has a non-zero imaginary part.
struct ct_mbrotcp_pixel pixel_cj = { -0.7, 0.3 };
________________________________
Fractal Pad: z^2 + c (Julia Set)
Grid Dims: 21 x 21
--------------------------------
]<F8-cd+k&`Q]JWS%Y<Tr
E2JQPh&\LJ5NAdV2i8gYK
~V(Pyn]{EpiLBJC]`pn*7
_[1..Gh5I<d(Ps8,z,8+]
'npUj_ie*^ zNcpBHy{Q>
mq [CMM__c\HV('<pjx!'
}c(E*Kf`yzQn=?73KKT$m
%dA^x@VTnTRH-h<0#(gt#
eqN.fF{U+Hw/Ke)/y7vAq
98l}I^veBH8P?;XPoV-W)
%H L7D&]H7V^e -eH-M7$
n#>D~nK4}IiZxHO'1PkSK
fmj-,K#yq&>TY#YXFJ/-5
S}dw:7y85)Bb)-1u. fE7
a&6j/H&!ppnDU F`%KHO\
mH-Je4Hp?eey8u(f>%z3o
O7^=Z}u?}HrRFo-`#owU-
+,]P)}9z5tj8*/PStyH-4
VRB4=-=(/:'HVR}u<s:F(
Kag$Ki=x2,cL~>{S{5=]q
:dRWbgkx[)J6i^%<jTNed
________________________________
Ahhh... That looks MUCH better for the symmetry seems to be broken!
;^D
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | comp.lang.c
csiph-web