https://samjohnston.org/2024/12/18/a-forgotten-manifesto-mozilla-betrays-its-own-values-on-open-source-ai/
https://samjohnston.org/2024/12/18/a-forgotten-manifesto-mozilla-betrays-its-own-values-on-open-source-ai/
https://samjohnston.org/2024/12/18/a-forgotten-manifesto-mozilla-betrays-its-own-values-on-open-source-ai/

so boring
#running #treadmill
so boring
#running #treadmill
so boring
#running #treadmill
convert -strip -quality 70 -resize 300x original.jpg resized.jpg
"original.jpg" being the filename of the input file and "resized.jpg" the filename of the output. You can play around with the width, "300x" means 300 pixels wide and the height is determined automatically to still remain in the same ratio. The quality is how much to compress it. The closer to 0 the value gets, the worse the result, but also smaller in file size. More towards 100 and the quality improves together with a larger file size.
You have to install the package "imagemagick" for this to work, I believe.
The encryption part seems to work, if I decrypt it the message with OpenSSL.
I think it can help you for some key parts not well explained in OpenSSL documentation.
@andros reading your spec I wrote a few notes here: https://github.com/eapl-gemugami/twtxt-direct-message-php/blob/main/direct_message_spec.md
@arne I haven't check your repo yet, although you are using sodium, right?
Known salt (B64): Tb9oj07UhwU= (8)
Known key (B64): MII0yj+MC0mHNx254Voar80bi9P7jmocs0+x+inaxBE=
Known iv (B64): l/PvkDjOKMFZe73KptrvWw== (16)
Shared Key (B64): ql8zvN03p6kroSwNrcKbxk4zSBQFkgQZEumvqVIDMAE=
** DECRYPT **
Encrypted Message: ...
Decoded Salt (B64): Tb9oj07UhwU= (8)
PBKDF2 KEY (B64): MII0yj+MC0mHNx254Voar80bi9P7jmocs0+x+inaxBE=
iv (B64): JanbU1jI30lb6yfjq/adjA== (16)
Decrypted Message:
ðŸ˜
There is a "00_well_known_message.enc" file, which I have the encryption paremters for (https://github.com/upputter/testing-twtxt-dm/blob/9fdf3be6aa8fe810a4cb275375dbb3d4a2a958ee/wellknown_test.php#L28).
According to my finding, I assume, that the
saltsize
in openssl is "8" and the PBKDF2
algo is "sha256".
I want to compare that I can read the encrypted message both from OpenSSL CLI and from the PHP OpenSSL library, following the spec.
# https://www.php.net/manual/en/function.openssl-pbkdf2.php
$password = $sharedKey;
$salt = openssl_random_pseudo_bytes(16); # What's the salt length ?
$keyLength = 20; # What's the key length here ?
$iterations = 100000;
$generatedKey = openssl_pbkdf2($password, $salt, $keyLength, $iterations, 'sha256');
echo bin2hex($generatedKey)."\n";
echo base64_encode($generatedKey)."\n";
$iv = openssl_random_pseudo_bytes(16); // AES-256-CBC requires 16-byte IV
$cipherText = openssl_encrypt($message, 'aes-256-cbc', $generatedKey, OPENSSL_RAW_DATA, $iv);
return base64_encode($iv . $cipherText);
-p
one can get an output of salt
, key
and iv
. My stupid PHP-code can get everything right from the encrypted data (from OpenSSL) - except the iv
! Damn "evpKDF" 😔
I don't think I'm going to be able to help you much, my knowledge of OpenSSL and PHP is not as high as I'd like it to be.
Maybe the OpenSSL version uses SHA-1 by default in PHP. Or that the IV is derived together with the key (not generated separately). But I'm not able to answer your questions, sorry.
I'm invoking the commands directly, without any libraries in between. Maybe that would help you?
I don't think I'm going to be able to help you much, my knowledge of OpenSSL and PHP is not as high as I'd like it to be.
Maybe the OpenSSL version uses SHA-1 by default in PHP. Or that the IV is derived together with the key (not generated separately). But I'm not able to answer your questions, sorry.
I'm invoking the commands directly, without any libraries in between. Maybe that would help you?
Ashram - Lucky's Song (My Dog)
https://youtu.be/oJ37mmym_LA
Ashram - Lucky's Song (My Dog)
https://youtu.be/oJ37mmym_LA
echo "Lorem ipsum" | openssl enc -aes-256-cbc -pbkdf2 -iter 100000 -out message.enc -pass file:shared_key.bin
will take the input string from
echo
to openssl
. It then will1. use the content of
shared_key.bin
as password2. use
PBKDF2
with an iteration of 100000 to generate a encryption key from the given password (shared_key.bin
)3. use the
PBKDF2
generated key for an aes-256-cbc
encryptionThe final result is encrypted data with the prepended salt (which was generated by runtime), e.g.:
Salted__q�;��-�T���"h%��5�� ...
.With a dummy script I now can generate a valide shared key within PHP 'openssl_pkey_derive()' - identical to OpenSSL.
I also can en-/decrypt salted data within my script, but not with OpenSSL. There are several parameters of
PBKDF2
unknown to me.Question:
1. Is the salt, used by
aes-256-cbc
and PBKDF2
the same, prepended in the encrypted data?2. Witch algorithm/cipher is used within
PBKDF2
: sha1, sha256, ...?3. What is the desired key length of
PBKDF2
(https://www.php.net/manual/en/function.openssl-pbkdf2.php)?To be continued ...
My usual method is slow, place in image program and re-save it smaller.
I used to have a Window's way to reduce file images from 1MB to 50 KB with right mouse click.

Some chooks not up this morning ?

my faviourite tree under wire netting, an apple, got fruit fly this year. bother
might need netting over it

Especially love my new pre loved roller doors !!

Love my new shed, getting ready to retire

A view of the deck, overlooking the new gardens.

#running #treadmill
#running #treadmill
#running #treadmill
Dead, zip narda.
Stupid program , what is wrong?
In Unbunti software, explore KolourPaint is says the "No application found"
Why can't the APP find the software on the WWW?
I get nothing. The stupid Kolour Paint will not run.
The wheeling wheel keeps on wheeling, yet everything else is fine.
Why can't you get you computer back when you shutdown Ubuntu?



