X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/0f00dc4c8eb47e67bc0f148c2dd109f73a451e0a..4fc776350ea8757539f65a3a56f7da3d9869ede7:/math/group-parse.c diff --git a/math/group-parse.c b/math/group-parse.c index b46898d6..61371f0f 100644 --- a/math/group-parse.c +++ b/math/group-parse.c @@ -7,21 +7,22 @@ /*----- Licensing notice --------------------------------------------------* * - * This file is part of Trivial IP Encryption (TrIPE). + * This file is part of Catacomb. * - * TrIPE is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * Catacomb is free software; you can redistribute it and/or modify + * it under the terms of the GNU Library General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. * - * TrIPE is distributed in the hope that it will be useful, + * Catacomb is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Library General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with TrIPE; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * You should have received a copy of the GNU Library General Public + * License along with Catacomb; if not, write to the Free + * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + * MA 02111-1307, USA. */ /*----- Header files ------------------------------------------------------*/ @@ -47,7 +48,7 @@ group *group_parse(qd_parse *qd) { group *g = 0; - switch (qd_enum(qd, "prime,ec")) { + switch (qd_enum(qd, "prime,bin,ec")) { case 0: { dh_param dp; qd_delim(qd, '{'); @@ -57,6 +58,14 @@ group *group_parse(qd_parse *qd) dh_paramfree(&dp); } break; case 1: { + gbin_param dp; + qd_delim(qd, '{'); + if (dhbin_parse(qd, &dp)) goto ouch; + qd_delim(qd, '}'); + g = group_binary(&dp); + dh_paramfree(&dp); + } break; + case 2: { ec_info ei; qd_delim(qd, '{'); if (ec_infoparse(qd, &ei)) goto ouch;