Re: encryption madness

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 59835
interpreted = N
texte = Single [URL]ing encrypted data is often not enough. Certain sequences = of [URL]ized random characters can still cause parse errors when the = data is passed in the query string (or retrieved from a db file) and = [UnUrl]ed. So it is a good practice to always double URL your encrypted = string. I.E. [text show=3Dt]encr=3D[url][url][encrypt = seed=3D1664][source][/encrypt][/url][/url] Now here is where may get confusing for those who have not used the = [encryption]/[decryption] contexts very often... After the encrypted string has been [URL]ed twice, decrypting the string = may only require a SINGLE [UnURL] action. This is because an 'implicit' = [UnURL] may have already occurred when retrieving the encrypted data. = For example, when the encrypted data is retrieved from an HTTP form post = (or QueryString), or when the encrypted data is retrieved from a = database. Given this information, your test template should contain something like = this: [if "[source]"=3D"[raw][source][/raw]"] [then] source =3D [text show=3Dt]source=3Dnouser[/text]
final =3D [text show=3Dt]final=3Dnouser[/text]
count =3D [math show=3Dt]count=3D1[/math]
encrypt source =3D [text show=3Dt]encr=3D[url][url][encrypt = seed=3D1664][source][/encrypt][/url][/url][/text] (value for link)
[/then] [else] source =3D [text show=3Dt]source=3D[source][/text]
final =3D [final]
count =3D [math show=3Dt]count=3D[count]+1[/math]
decrypt previous =3D [text show=3Dt]decr=3D[decrypt = seed=3D1664][unurl][encr][/unurl][/decrypt][/text]
encrypt source =3D [text show=3Dt]encr=3D[url][url][encrypt = seed=3D1664][decr][/encrypt][/url][/url][/text] (value for link)
[/else] [/if] newfinal =3D [text show=3Dt]newfinal=3D[decrypt = seed=3D1664][unurl][unurl][encr][/unurl][/unurl][/decrypt][/text]

[if ("[source]"=3D"[final]") & ("[source]"!"")] [then] ok - next [/then] [else] failed [/else] [/if] Note that the [decr] value only requires a single [UnURL] action, as the = encrypted value will have already gone through one implicit UnURL = action. But the 'newfinal' still requires a double [unurl] action, = since the [encr] value is being used directly, and has not been 'passed' = or 'retrieved' by some other means. -----Original Message----- From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of Thierry Almy Sent: Monday, November 01, 2004 12:41 PM To: WebDNA Talk Subject: encryption madness I'm trying to figure out how the encryption/decryption works but I'm=20 getting crazy ... I made a small template that encrypts and urls a value, then it uses=20 a link to pass it to itself, decrypt and encrypt it again. Finally it=20 checks if the source value and the final value are the same ... and=20 so on. I can make between 3 and 15 turns, then it fails. Here's the code. I don't know what I'm doing wrong ... Thierry
 
[if "[source]"=3D"[raw][source][/raw]"] [then] source =3D [text show=3Dt]source=3Dnouser[/text]
final =3D [text show=3Dt]final=3Dnouser[/text]
count =3D [math show=3Dt]count=3D1[/math]
encrypt source =3D [text show=3Dt]encr=3D[url][encrypt=20 seed=3D1664][source][/encrypt][/url][/text] (value for link)
[/then] [else] source =3D [text show=3Dt]source=3D[source][/text]
final =3D [final]
count =3D [math show=3Dt]count=3D[count]+1[/math]
decrypt previous =3D [text show=3Dt]decr=3D[decrypt=20 seed=3D1664][unurl][encr][/unurl][/decrypt][/text]
encrypt source =3D [text show=3Dt]encr=3D[url][encrypt=20 seed=3D1664][decr][/encrypt][/url][/text] (value for link)
[/else] [/if] newfinal =3D [text show=3Dt]newfinal=3D[decrypt=20 seed=3D1664][unurl][encr][/unurl][/decrypt][/text]

[if ("[source]"=3D"[final]") & ("[source]"!"")] [then] ok - next [/then] [else] failed [/else] [/if]
------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to = Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: encryption madness ( Thierry Almy 2004)
  2. Re: encryption madness ( "Scott Anderson" 2004)
  3. Re: encryption madness ( Thierry Almy 2004)
  4. Re: encryption madness ( Squaredancer@t-online.de (Squaredancer) 2004)
  5. encryption madness ( Thierry Almy 2004)
  6. Re: encryption madness (John Hill 2003)
  7. Re: encryption madness (Kimberly D. Walls 2003)
  8. Re: encryption madness (Brian Fries 2003)
  9. Re: encryption madness (Kenneth Grome 2003)
  10. Re: encryption madness (John Hill 2003)
  11. Re: encryption madness (Kimberly D. Walls 2003)
  12. Re: encryption madness (Kenneth Grome 2003)
  13. Re: encryption madness (Kimberly D. Walls 2003)
  14. Re: encryption madness (Kimberly D. Walls 2003)
  15. Re: encryption madness (Kimberly D. Walls 2003)
  16. Re: encryption madness (Stuart Tremain 2003)
  17. Re: encryption madness (Brian Fries 2003)
  18. Re: encryption madness (Kenneth Grome 2003)
  19. Re: encryption madness (Stuart Tremain 2003)
  20. Re: encryption madness (Kenneth Grome 2003)
  21. Re: encryption madness (Donovan 2003)
  22. Re: encryption madness (Glenn Busbin 2003)
  23. Re: encryption madness (Andrew Simpson 2003)
  24. Re: encryption madness (Stuart Tremain 2003)
  25. Re: encryption madness (Tim Robinson 2003)
  26. Re: encryption madness (Andrew Simpson 2003)
  27. Re: encryption madness (Kimberly D. Walls 2003)
  28. Re: encryption madness (Glenn Busbin 2003)
  29. Re: encryption madness (Stuart Tremain 2003)
  30. Re: encryption madness (Rob Marquardt 2003)
  31. Re: encryption madness (Kimberly D. Walls 2003)
  32. Re: encryption madness (Kimberly D. Walls 2003)
  33. Re: encryption madness (Glenn Busbin 2003)
  34. Re: encryption madness (Bob Minor 2003)
Single [url]ing encrypted data is often not enough. Certain sequences = of [url]ized random characters can still cause parse errors when the = data is passed in the query string (or retrieved from a db file) and = [unurl]ed. So it is a good practice to always double URL your encrypted = string. I.E. [text show=3Dt]encr=3D[url][url][encrypt = seed=3D1664][source][/encrypt][/url][/url] Now here is where may get confusing for those who have not used the = [encryption]/[decryption] contexts very often... After the encrypted string has been [url]ed twice, decrypting the string = may only require a SINGLE [unurl] action. This is because an 'implicit' = [unurl] may have already occurred when retrieving the encrypted data. = For example, when the encrypted data is retrieved from an HTTP form post = (or QueryString), or when the encrypted data is retrieved from a = database. Given this information, your test template should contain something like = this: [if "[source]"=3D"[raw][source][/raw]"] [then] source =3D [text show=3Dt]source=3Dnouser[/text]
final =3D [text show=3Dt]final=3Dnouser[/text]
count =3D [math show=3Dt]count=3D1[/math]
encrypt source =3D [text show=3Dt]encr=3D[url][url][encrypt = seed=3D1664][source][/encrypt][/url][/url][/text] (value for link)
[/then] [else] source =3D [text show=3Dt]source=3D[source][/text]
final =3D [final]
count =3D [math show=3Dt]count=3D[count]+1[/math]
decrypt previous =3D [text show=3Dt]decr=3D[decrypt = seed=3D1664][unurl][encr][/unurl][/decrypt][/text]
encrypt source =3D [text show=3Dt]encr=3D[url][url][encrypt = seed=3D1664][decr][/encrypt][/url][/url][/text] (value for link)
[/else] [/if] newfinal =3D [text show=3Dt]newfinal=3D[decrypt = seed=3D1664][unurl][unurl][encr][/unurl][/unurl][/decrypt][/text]

[if ("[source]"=3D"[final]") & ("[source]"!"")] [then] ok - [thisurl]?source=3D[source]&final=3D[newfinal]&encr=3D[encr]&coun= t=3D[count]">next [/then] [else] failed [/else] [/if] Note that the [decr] value only requires a single [unurl] action, as the = encrypted value will have already gone through one implicit UnURL = action. But the 'newfinal' still requires a double [unurl] action, = since the [encr] value is being used directly, and has not been 'passed' = or 'retrieved' by some other means. -----Original Message----- From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of Thierry Almy Sent: Monday, November 01, 2004 12:41 PM To: WebDNA Talk Subject: encryption madness I'm trying to figure out how the encryption/decryption works but I'm=20 getting crazy ... I made a small template that encrypts and urls a value, then it uses=20 a link to pass it to itself, decrypt and encrypt it again. Finally it=20 checks if the source value and the final value are the same ... and=20 so on. I can make between 3 and 15 turns, then it fails. Here's the code. I don't know what I'm doing wrong ... Thierry
 
[if "[source]"=3D"[raw][source][/raw]"] [then] source =3D [text show=3Dt]source=3Dnouser[/text]
final =3D [text show=3Dt]final=3Dnouser[/text]
count =3D [math show=3Dt]count=3D1[/math]
encrypt source =3D [text show=3Dt]encr=3D[url][encrypt=20 seed=3D1664][source][/encrypt][/url][/text] (value for link)
[/then] [else] source =3D [text show=3Dt]source=3D[source][/text]
final =3D [final]
count =3D [math show=3Dt]count=3D[count]+1[/math]
decrypt previous =3D [text show=3Dt]decr=3D[decrypt=20 seed=3D1664][unurl][encr][/unurl][/decrypt][/text]
encrypt source =3D [text show=3Dt]encr=3D[url][encrypt=20 seed=3D1664][decr][/encrypt][/url][/text] (value for link)
[/else] [/if] newfinal =3D [text show=3Dt]newfinal=3D[decrypt=20 seed=3D1664][unurl][encr][/unurl][/decrypt][/text]

[if ("[source]"=3D"[final]") & ("[source]"!"")] [then] ok - [thisurl]?source=3D[source]&final=3D[newfinal]&encr=3D[encr]&coun= t=3D[count]">next [/then] [else] failed [/else] [/if]
------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to = Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ "Scott Anderson"

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Bug Report, maybe (1997) Email template names (1997) WebCat2 beta FTP site (1997) [WebDNA] Developer Resource Center Redirect (2008) WebTV problems with WebCatalog?? (1998) won't serve .tpl (2000) Database Updates (1997) Multiple prices (1997) WebCat vs. ASP (1999) Deleting Multiple Database Records based on Checkbox (1998) [WaitForFile] wait for open file, not closed file (2001) webcat license???? (1997) [WebDNA] [OT] ImageMagick or similar (2015) How can I Add several Items into the cart at once? (1997) WebCat2b15MacPlugin - showing [math] (1997) lineIndex help... Please (1998) RE: [WebDNA] ONLY the FIRST continuous run of numeric chars? (2008) notification solutions (1997) NT or Mac (1997) Re:PCS Customer submissions ? (1997)