Quellcode durchsuchen

gpg batch parameters for curve 25519

Bob Mottram vor 7 Jahren
Ursprung
Commit
1286c030b0
3 geänderte Dateien mit 12 neuen und 8 gelöschten Zeilen
  1. 3
    2
      src/freedombone-adduser
  2. 6
    4
      src/freedombone-base-email
  3. 3
    2
      src/freedombone-utils-backup

+ 3
- 2
src/freedombone-adduser Datei anzeigen

136
 chmod 600 /home/$ADD_USERNAME/.gnupg/*
136
 chmod 600 /home/$ADD_USERNAME/.gnupg/*
137
 
137
 
138
 # Generate a GPG key
138
 # Generate a GPG key
139
-echo 'Key-Type: 9' > /home/$ADD_USERNAME/gpg-genkey.conf
140
-echo 'Subkey-Type: 1' >> /home/$ADD_USERNAME/gpg-genkey.conf
139
+echo 'Key-Type: eddsa' > /home/$ADD_USERNAME/gpg-genkey.conf
140
+echo 'Key-Curve: Ed25519' > /home/$ADD_USERNAME/gpg-genkey.conf
141
+echo 'Subkey-Type: eddsa' >> /home/$ADD_USERNAME/gpg-genkey.conf
141
 echo "Name-Real:  $ADD_USERNAME" >> /home/$ADD_USERNAME/gpg-genkey.conf
142
 echo "Name-Real:  $ADD_USERNAME" >> /home/$ADD_USERNAME/gpg-genkey.conf
142
 echo "Name-Email: $ADD_USERNAME@$HOSTNAME" >> /home/$ADD_USERNAME/gpg-genkey.conf
143
 echo "Name-Email: $ADD_USERNAME@$HOSTNAME" >> /home/$ADD_USERNAME/gpg-genkey.conf
143
 echo 'Expire-Date: 0' >> /home/$ADD_USERNAME/gpg-genkey.conf
144
 echo 'Expire-Date: 0' >> /home/$ADD_USERNAME/gpg-genkey.conf

+ 6
- 4
src/freedombone-base-email Datei anzeigen

1505
     KEYGRIP=$(gpg --fingerprint --fingerprint $MY_EMAIL_ADDRESS | grep fingerprint | tail -1 | cut -d= -f2 | sed -e 's/ //g')
1505
     KEYGRIP=$(gpg --fingerprint --fingerprint $MY_EMAIL_ADDRESS | grep fingerprint | tail -1 | cut -d= -f2 | sed -e 's/ //g')
1506
 
1506
 
1507
     # Generate a GPG subkey
1507
     # Generate a GPG subkey
1508
-    echo 'Key-Type: 9' > /home/$MY_USERNAME/gpg-genkey.conf
1508
+    echo 'Key-Type: eddsa' > /home/$MY_USERNAME/gpg-genkey.conf
1509
+    echo 'Key-Curve: Ed25519' > /home/$MY_USERNAME/gpg-genkey.conf
1509
     echo "Key-Grip: $KEYGRIP" > /home/$MY_USERNAME/gpg-genkey.conf
1510
     echo "Key-Grip: $KEYGRIP" > /home/$MY_USERNAME/gpg-genkey.conf
1510
-    echo 'Subkey-Type: 1' >> /home/$MY_USERNAME/gpg-genkey.conf
1511
+    echo 'Subkey-Type: eddsa' >> /home/$MY_USERNAME/gpg-genkey.conf
1511
     echo "subkey-Usage: $GPG_KEY_USAGE" > /home/$MY_USERNAME/gpg-genkey.conf
1512
     echo "subkey-Usage: $GPG_KEY_USAGE" > /home/$MY_USERNAME/gpg-genkey.conf
1512
     echo "Name-Real:  $MY_NAME" >> /home/$MY_USERNAME/gpg-genkey.conf
1513
     echo "Name-Real:  $MY_NAME" >> /home/$MY_USERNAME/gpg-genkey.conf
1513
     echo "Name-Email: $MY_EMAIL_ADDRESS" >> /home/$MY_USERNAME/gpg-genkey.conf
1514
     echo "Name-Email: $MY_EMAIL_ADDRESS" >> /home/$MY_USERNAME/gpg-genkey.conf
1622
         fi
1623
         fi
1623
     else
1624
     else
1624
         # Generate a GPG key
1625
         # Generate a GPG key
1625
-        echo 'Key-Type: 9' > /home/$MY_USERNAME/gpg-genkey.conf
1626
-        echo 'Subkey-Type: 1' >> /home/$MY_USERNAME/gpg-genkey.conf
1626
+        echo 'Key-Type: eddsa' > /home/$MY_USERNAME/gpg-genkey.conf
1627
+        echo 'Key-Curve: Ed25519' >> /home/$MY_USERNAME/gpg-genkey.conf
1628
+        echo 'Subkey-Type: eddsa' >> /home/$MY_USERNAME/gpg-genkey.conf
1627
         echo "Name-Real:  $MY_NAME" >> /home/$MY_USERNAME/gpg-genkey.conf
1629
         echo "Name-Real:  $MY_NAME" >> /home/$MY_USERNAME/gpg-genkey.conf
1628
         echo "Name-Email: $MY_EMAIL_ADDRESS" >> /home/$MY_USERNAME/gpg-genkey.conf
1630
         echo "Name-Email: $MY_EMAIL_ADDRESS" >> /home/$MY_USERNAME/gpg-genkey.conf
1629
         echo 'Expire-Date: 0' >> /home/$MY_USERNAME/gpg-genkey.conf
1631
         echo 'Expire-Date: 0' >> /home/$MY_USERNAME/gpg-genkey.conf

+ 3
- 2
src/freedombone-utils-backup Datei anzeigen

65
     # Generate a GPG key for backups
65
     # Generate a GPG key for backups
66
     BACKUP_KEY_EXISTS=$(gpg_key_exists "$MY_USERNAME" "$MY_NAME (backup key)")
66
     BACKUP_KEY_EXISTS=$(gpg_key_exists "$MY_USERNAME" "$MY_NAME (backup key)")
67
     if [[ $BACKUP_KEY_EXISTS == "no" ]]; then
67
     if [[ $BACKUP_KEY_EXISTS == "no" ]]; then
68
-        echo 'Key-Type: 9' > /home/$MY_USERNAME/gpg-genkey.conf
69
-        echo 'Subkey-Type: 1' >> /home/$MY_USERNAME/gpg-genkey.conf
68
+        echo 'Key-Type: eddsa' > /home/$MY_USERNAME/gpg-genkey.conf
69
+        echo 'Key-Curve: Ed25519' > /home/$MY_USERNAME/gpg-genkey.conf
70
+        echo 'Subkey-Type: eddsa' >> /home/$MY_USERNAME/gpg-genkey.conf
70
         echo "Name-Real:  $MY_NAME" >> /home/$MY_USERNAME/gpg-genkey.conf
71
         echo "Name-Real:  $MY_NAME" >> /home/$MY_USERNAME/gpg-genkey.conf
71
         echo "Name-Email: $MY_EMAIL_ADDRESS" >> /home/$MY_USERNAME/gpg-genkey.conf
72
         echo "Name-Email: $MY_EMAIL_ADDRESS" >> /home/$MY_USERNAME/gpg-genkey.conf
72
         echo "Name-Comment: backup key" >> /home/$MY_USERNAME/gpg-genkey.conf
73
         echo "Name-Comment: backup key" >> /home/$MY_USERNAME/gpg-genkey.conf