Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #11814 > unrolled thread

Bug#939181: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye

Started bypeter green <plugwash@p10link.net>
First post2019-09-15 16:00 +0200
Last post2019-09-18 17:50 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.debian.maint.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Bug#939181: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye peter green <plugwash@p10link.net> - 2019-09-15 16:00 +0200
    Bug#939181: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye Andreas Tille <andreas@an3as.eu> - 2019-09-16 11:50 +0200
      Re: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye Michael Kesper <mkesper@schokokeks.org> - 2019-09-16 12:00 +0200
        Re: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye Andreas Tille <andreas@an3as.eu> - 2019-09-18 17:50 +0200

#11814 — Bug#939181: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye

Frompeter green <plugwash@p10link.net>
Date2019-09-15 16:00 +0200
SubjectBug#939181: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye
Message-ID<yGD4C-1Lw-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

> > tmp = rt.encrypt('Cycle{}'.format(pickle.dumps(objSave)))
>
> Thanks to this hint
This hint was *wrong*, it will introduce garbage into the string and the "rotor" code is clearly designed to work with byte strings, not unicode strings.

Change it to

"tmp=rt.encrypt( b'Cycle'+pickle.dumps(objSave) )"


[toc] | [next] | [standalone]


#11824

FromAndreas Tille <andreas@an3as.eu>
Date2019-09-16 11:50 +0200
Message-ID<yGVEe-6ip-9@gated-at.bofh.it>
In reply to#11814
Hi Peter,

On Sun, Sep 15, 2019 at 02:47:50PM +0100, peter green wrote:
> > > tmp = rt.encrypt('Cycle{}'.format(pickle.dumps(objSave)))
> > 
> > Thanks to this hint
> This hint was *wrong*, it will introduce garbage into the string and the "rotor" code is clearly designed to work with byte strings, not unicode strings.
> 
> Change it to
> 
> "tmp=rt.encrypt( b'Cycle'+pickle.dumps(objSave) )"

Thanks a lot for your patience.  Unfortunately this is not
yet the final solution:

...
Traceback (most recent call last):
  File "/usr/bin/cycle", line 83, in OnCloseWindow
    Save_Cycle(cycle.name, cycle.passwd, cycle.file)
  File "/usr/share/cycle/save_load.py", line 46, in Save_Cycle
    tmp=rt.encrypt( b'Cycle'+pickle.dumps(objSave) )
  File "/usr/share/cycle/p_rotor.py", line 63, in encrypt
    return self.cryptmore(buf, 0)
  File "/usr/share/cycle/p_rotor.py", line 88, in cryptmore
    c = rotors[i][c ^ pos[i]]
TypeError: unsupported operand type(s) for ^: 'int' and 'float'


Kind regards

       Andreas. 

-- 
http://fam-tille.de

[toc] | [prev] | [next] | [standalone]


#11825 — Re: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye

FromMichael Kesper <mkesper@schokokeks.org>
Date2019-09-16 12:00 +0200
SubjectRe: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye
Message-ID<yGVXz-6qj-5@gated-at.bofh.it>
In reply to#11824

[Multipart message — attachments visible in raw view] — view raw

Hi Andreas,

On 16.09.19 11:38, Andreas Tille wrote:
> Hi Peter,
> 
> On Sun, Sep 15, 2019 at 02:47:50PM +0100, peter green wrote:
>>>> tmp = rt.encrypt('Cycle{}'.format(pickle.dumps(objSave)))
>>>
>>> Thanks to this hint
>> This hint was *wrong*, it will introduce garbage into the string and the "rotor" code is clearly designed to work with byte strings, not unicode strings.
>>
>> Change it to
>>
>> "tmp=rt.encrypt( b'Cycle'+pickle.dumps(objSave) )"

Oops, got that backwards. Thanks for spotting this.
 
> Thanks a lot for your patience.  Unfortunately this is not
> yet the final solution:
> 
> ...
> Traceback (most recent call last):
>   File "/usr/bin/cycle", line 83, in OnCloseWindow
>     Save_Cycle(cycle.name, cycle.passwd, cycle.file)
>   File "/usr/share/cycle/save_load.py", line 46, in Save_Cycle
>     tmp=rt.encrypt( b'Cycle'+pickle.dumps(objSave) )
>   File "/usr/share/cycle/p_rotor.py", line 63, in encrypt
>     return self.cryptmore(buf, 0)
>   File "/usr/share/cycle/p_rotor.py", line 88, in cryptmore
>     c = rotors[i][c ^ pos[i]]
> TypeError: unsupported operand type(s) for ^: 'int' and 'float'

That code could be patched by using int() around potentially float
numbers. But honestly, it should better be ripped out and use
real encryption. The docstring tells so:
The rotor module has been removed from the Python 2.4
distribution because

      the rotor module uses an insecure algorithm and is deprecated.
      ==============================================================

Best wishes
Michael

[toc] | [prev] | [next] | [standalone]


#11834 — Re: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye

FromAndreas Tille <andreas@an3as.eu>
Date2019-09-18 17:50 +0200
SubjectRe: [Help] Re: Bug#939181: cycle: Python2 removal in sid/bullseye
Message-ID<yHKnn-7eh-7@gated-at.bofh.it>
In reply to#11825
Hi Michael,

On Mon, Sep 16, 2019 at 11:56:48AM +0200, Michael Kesper wrote:
> But honestly, it should better be ripped out and use
> real encryption. The docstring tells so:
> The rotor module has been removed from the Python 2.4
> distribution because
> 
>       the rotor module uses an insecure algorithm and is deprecated.
>       ==============================================================

While I for sure agree with you on principle this would mean becoming
upstream for cycle.  If there is some volunteer for doing this I'd be
really happy.

Kind regards

      Andreas.

-- 
http://fam-tille.de

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.maint.python


csiph-web